I'm making a game that has a sprite change weapons can sum 1 tel me how 2 do it
Offline
rojasscratches wrote:
I'm making a game that has a sprite change weapons can sum 1 tel me how 2 do it
i have a script
[blocks]<when[ w ]key pressed>
<set{ weapon }to( weapon1
[/blocks]
and do that for all keys and weapons
then
[blocks]<when[ whatever key to fight ]key pressed>
<if> <( weapon <=> weapon1 )>
<broadcast[ shoot with weapon 1 [/blocks]
and extend that if for all weapons.
Offline
iTweakOr's method will work, but there's no real visible change. You'd have to either make a second sprite which is always staying in the guy's hand and switches costume based on the value of the "weapon" variable, or you'd have to make another costume for your first sprite where he's holding something differently, again, based off the value of the "weapon" variable.
Offline