Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
NOMAX undeclared identifier.
by Petra. 01/09/26 21:12
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Rasch), 3,765 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 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