Urban Wars

Help => Programming/Coding => Topic started by: Mexicouger on April 25, 2010, 11:41:49 pm



Title: pleasse help!
Post by: Mexicouger on April 25, 2010, 11:41:49 pm
DUKE! can you pretty please mod the explodebox to regenerate! I need it so flippin bad! I`ve spent almost 3 hours trying to get the fooking thing to work! can you please make the regen code attache dto the explodebox and post it! I`m dyin here!


Title: Re: pleasse help!
Post by: DukeInstinct on April 26, 2010, 12:27:51 am
I'm going to just make a new respawn function since sub_regen is supposed to be for items.

Code:
.string mdl;

void() Respawn =
{
setmodel(self, self.mdl);
self.takedamage=TRUE;
self.solid=SOLID_SLIDEBOX;
}

void(float RespawnDelay) SetRespawn =
{
self.mdl=self.model;
setmodel(self, "");

self.takedamage=FALSE;
self.solid=SOLID_NOT;

self.think=Respawn;
self.nextthink=time+RespawnDelay;
}


So now, instead of having "remove(self)" or "self.nextthink=SUB_Remove" put "SetRespawn(10);".


Title: Re: pleasse help!
Post by: Mexicouger on April 26, 2010, 07:21:07 am
So basically in all, it turnes the model invisible and then returns it`s original form in a set amount of time?


Title: Re: pleasse help!
Post by: DukeInstinct on April 26, 2010, 10:17:24 am
Invisible, ethereal, and untraceable for 10 seconds.


Title: Re: pleasse help!
Post by: Mexicouger on April 27, 2010, 07:22:14 am
I fixed the respawning problem. You declared it`s model before its solid or movetype. You are supposed to say movetype and solid before setmodel. So model regen works perfect ^.^


Title: Re: pleasse help!
Post by: Mexicouger on April 28, 2010, 08:47:45 am
Model regeneration i sin perfect. I tweaked it to work