Solved Can anyone tell me why this won't work

Question that is answered or resolved.

imaninja1991

New member
I'm trying to make a script where if the player is pushing attack while walking he will shoot, but only if he is pushing enter. Like contra. I tried this script.

{// Revert to idle if left and right are not pressed
    void self = getlocalvar("self");
    int iPIndex = getentityproperty(self,"playerindex"); //Get player index
    void iRKey = playerkeys(iPIndex, 0, "attack");

    if (iRKey){
      stop();
      spawn01("bullet", 0, 0, 0 );
    }
}

But it keeps crashing. Also I might use shoot instead but still.
 
I can't tell what's wrong without looking at error message.
Oh is this exactly how you set it?

Also this function calls other functions i.e stop and spawn01, are those 2 functions available?
 
Back
Top Bottom