Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 838 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
help with change movemode #230652
10/07/08 13:43
10/07/08 13:43
Joined: Feb 2008
Posts: 85
Germany
Schloder87 Offline OP
Junior Member
Schloder87  Offline OP
Junior Member

Joined: Feb 2008
Posts: 85
Germany
i got a problem with my movemodes

how is it possible that i can switch movemodes by 1-5?

i started with that:

function select_movemode()
{
playerIntentions_boxing();

if (Key_Pressed(action2_key_scancode)==on)
{
playerIntentions_onehandsword();





}

but it only works, if i stay on action2_key...


Visit IGRAVISION at: http://www.igravision.com
_________________________
Re: help with change movemode [Re: Schloder87] #230697
10/07/08 19:24
10/07/08 19:24
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline
Senior Member
sadsack  Offline
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
I don't know if this will help, but if you want to stay in that function untill you press another key to go to a nother function like function fight_with_ax()
I would try this. You must have while loops in you functions to stay in them.

var sword_1hand = 1;

var axfight = 1

then something like this in the while loop

if (sword_1hand = 1)
{playerIntentions_onehandsword();}
if (axfight = 0)
{fight_with_ax()}

if(key_a){sword_1hand = 1;}
if(key_b){axfight = 0;}

Now at the bottom of your code put your functions

function playerIntentions_onehandsword()
{
code goes here.

}

function fight_with_ax()

{
code goes here

}

Now this is very simple so you are going to have some more stuff.
don't for get to declare your functions.
renny

EDIT: oh yes, if you have a loop in your function, make sure you have a way to get out of it when you want.

Last edited by sadsack; 10/07/08 19:28.

I have A7 Commercial .............. Now I just need to learn how to use it


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1