UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[TuT]how to thread zombies as "self"

broken avatar :(
Created 12 years ago
by jjbradman
0 Members and 1 Guest are viewing this topic.
3,862 views
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 6 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
ok so i am a lil bit drunk :v i why not make a tutorial xD

summary: this code will let you have everyzombie that spawns as a "self" ent so you can make threads with it to run random stuff with him :P

ok to start open your "_zombiemode_spawner.gsc"
and find
Code Snippet
Plaintext
self.flame_damage_time = 0;

and after that add

Code Snippet
Plaintext
if(randomint(100) > 50)
{
self thread special_zombie();
}

and at the bottom add

Code Snippet
Plaintext
special_zombie()
{
self thread _fx();
self waittill( "death" );
PlayFxOnTag( level._effect["dog_gib"], self, "tag_origin" );
}

_fx()
{
PlayFxOnTag( level._effect["dog_trail_fire"], self, "tag_origin" );
}

explanation:
  here the code will get the zombie as "self" you can play fx in

Code Snippet
Plaintext
PlayFxOnTag( level._effect["dog_trail_fire"], self, "tag_origin" );

self being an ent in this case the zombie and "tag origin" the tag in that ent where the fx will be played.
also the code in zombiemode_spawner will run this on every zombie spawned so only if the random number is bigger or smaller(i dont really remember so google the operators for C# xP) the code inside the "if statement" will be runned, which in this case will play a fire fx on the zombie and upon death it will explode.

this can help you to spawn special zombies, bosses, etc so enjoy learning something from it :)
using this you can put fx on random zombies or do something like this :)...upon death the zombies will spawn an fx which will travel to the hole in the ceiling :P

Last Edit: April 08, 2014, 12:39:55 am by jjbradman
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 7 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
How to follow tutorial:

1. Get Drunk
2. Follow Tutorial
2. ......
2. Profit?!?

Tutorial is a little bit difficult to understand(likely for obvious reasons) but should do the trick, thanks for the contribution.
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 6 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
How to follow tutorial:

1. Get Drunk
2. Follow Tutorial
2. ......
2. Profit?!?

Tutorial is a little bit difficult to understand(likely for obvious reasons) but should do the trick, thanks for the contribution.

i'll may make it easier to understand after my headds stops making circicles (/n\) hjgfshjdf haha. it is also hard to explain this stuff when i only speak english while inside the forums as im from mexico :v lol
Last Edit: April 07, 2014, 10:08:18 pm by jjbradman

 
Loading ...