|
4 registered members (JMMAC, TipmyPip, 2 invisible),
5,269
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: change model's action when running
[Re: upczhsh]
#83229
07/25/06 12:54
07/25/06 12:54
|
Joined: May 2005
Posts: 819 U.S.
Why_Do_I_Die
Warned
|
Warned
Joined: May 2005
Posts: 819
U.S.
|
well u can modify his action through script , or just call functions from his action when u want to change his action.
i.e. , say u wanted the player to jump 3 feet , but after eating a green tomatoe he will jump 10 feet, then u could do in his action the jump code , when pressing space bar if my.skill1>0 my jump = 10 feet , else my jump = 3 feet
that isnt actual code , just a layout of how it can be done.
Last edited by Why_Do_I_Die; 07/25/06 12:58.
|
|
|
Re: change model's action when running
[Re: upczhsh]
#83231
07/25/06 13:08
07/25/06 13:08
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
You should see all the variations in my 2D game. Take the behavior of the left shift key. When in the air, the flash attack is used and it can only be used once until certain conditions are met (after using the bounce stomp or fall-glide-hop or simply landing). When on the ground and held, the speed blast charges up. The enter key has several functions as well. It selects items in the menus, it advances through text in the interactive tutorial, and confirms input entries (from inkey - a built-in feature). Because you can jump 6 times (5 in mid-air, resetting under certain circumstances), there are various other conditions and things.
A similar thing can be done. The three important fundamentals to scripting in your case would be using and understanding if statements, and using and understanding function calls. A third is variable manipulation.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|