Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How can i repeat a function over and over(creating a loop)? #389333
12/13/11 04:59
12/13/11 04:59
Joined: May 2010
Posts: 23
M
Mandeville Offline OP
Newbie
Mandeville  Offline OP
Newbie
M

Joined: May 2010
Posts: 23
I create a function to remove a car when he collide a invisible barrier at the end of is path. It worked fine but only once. there is my code;


Code:
function remove_car()
{ 
	
	
   my.emask = NULL; 
   wait(1);
   		ent_remove(you);
				ent_create("car1.mdl",vector(-10763.596,-1458.010,-5591.721),car );
wait(1);

}



action wall()
{
my.emask |= ENABLE_IMPACT;
	
my.event = remove_car;


 wait(1);

}



I need some help please.

Re: How can i repeat a function over and over(creating a loop)? [Re: Mandeville] #389334
12/13/11 05:40
12/13/11 05:40
Joined: May 2010
Posts: 23
M
Mandeville Offline OP
Newbie
Mandeville  Offline OP
Newbie
M

Joined: May 2010
Posts: 23
Nevermind. my.emask = NULL; was there for nothing. Im dumb tonight!

Re: How can i repeat a function over and over(creating a loop)? [Re: Mandeville] #389347
12/13/11 09:59
12/13/11 09:59
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
You don't need a loop here because the event should occure any time when any entity impacts with the wall.

And yes, the "my.emask = NULL;" is not needed here.


Gamestudio download | 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