Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, JeyKey II), 12,601 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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