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

Freeze/zombie_move_speed = 0; on grenade explosion (for widows wine perk)

broken avatar :(
Created 9 years ago
by louisfm16
0 Members and 1 Guest are viewing this topic.
5,037 views
broken avatar :(
×
broken avatar :(
Location: usCali
Date Registered: 11 July 2015
Last active: 7 years ago
Posts
21
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
Live and Learn
×
louisfm16's Groups
louisfm16's Contact & Social LinksPortfolio
Hi again guys and gals, I have been working on what I believe to be the widows wine perk from black ops 3
the features so far:
1) every zombie that hits you behind a window instantly dies
2) when hit by a zombie behind the window you get (depending on your health) 25 - 250 points
    - the more hits you take in a row the higher the awarded score is.
    - a visual example:
      - 100% health = +25 points
      - 80% health = +50 points
      - 60% health = +100 points
      - 40% health = +150 points
      - 20% health = +250 points

a few hours ago the achievements for bo3 zombies where released and 1 of them talks about getting zombies stuck when hit by a grenade explosion which leads to my question:

I am pretty sure I could freeze zombies in place by setting there move speed to 0 but I need a way to get an array of the zombies I hit by a grenade so I was wondering if any scripters know of a way to get an array of zombies and/or players hit by a grenade explosion

so i was hoping to do a script like so
Code Snippet
Plaintext
zombiesHit = getEntHit();

for(i = 0; i < zombiesHit.size; i++) {
    zombiesHit[i].zombie_run_speed = 0;
    playFx(level._effect["spider_web"], zombiesHit[i] getOrigin);
}
any help or ideas are greatly appreciated
Thanks again
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: usCali
Date Registered: 11 July 2015
Last active: 7 years ago
Posts
21
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
Live and Learn
×
louisfm16's Groups
louisfm16's Contact & Social LinksPortfolio
Ok so I did a bit of research in the forums and found a way to get zombies hit by a certain grenade

Code Snippet
Plaintext
zombies = getaiarray("axis");
radius = spawn("trigger_radius", grenade.origin);

for(i = 0; i < zombies.size; i++) {
    if(zombies[i] isTouching(radius)) {
        zombies[i].zombie_move_speed = 0; // I want to freeze the zombies here
        playfx(level._effect["spider_web"], zombies[i].origin);
    }
}

 but now I need to find a way to freeze them in place.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I often wondered how this was done myself. I didn't think you could adjust time scale for just one zombie but I don't know. zombie_move_speed is only an integer while it sets up the zombie speed, then becomes a string, I am pretty sure, of walk, run, or sprint. Which is used for getting the correct anim to play. Perhaps the freeze is another set of anims? You could make an array of these new anims (you or someone would make and precache) and select from them?

If you find something like that to be true, and you can make these anims, then you could use in script:

Code Snippet
Plaintext
//this would be done in script somewhere only once I think
//level._freeze_anims = [];
//level._freeze_anims[level._freeze_anims.size] = %freeze1;
//level._freeze_anims[level._freeze_anims.size] = %freeze2;//and so on

//This would be done in your script
zombies = getaiarray("axis");
radius = spawn("trigger_radius", grenade.origin);

for(i = 0; i < zombies.size; i++) {
    if(zombies[i] isTouching(radius)) {
        //zombies[i].zombie_move_speed = 0; // I want to freeze the zombies here
        zombies[i] animscripted("freeze", zombies[i].origin, zombies[i].angles, level._freeze_anims[randomint(level._freeze_anims.size)]);
        playfx(level._effect["spider_web"], zombies[i].origin);
    }
}



Of course I am just guessing, maybe there is a much simpler way?
Last Edit: October 06, 2015, 12:34:08 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 3 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
bluntstuffy made a powerup that does something similar but slows them down rather than stop them. you could use the portion that slows them down for this and slow them down to a point where it looks like they are standing still

http://ugx-mods.com/forum/index.php/topic,7165.0.html
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
bluntstuffy made a powerup that does something similar but slows them down rather than stop them. you could use the portion that slows them down for this and slow them down to a point where it looks like they are standing still

http://ugx-mods.com/forum/index.php/topic,7165.0.html

Nice, that would be much easier. I had heard before someone say you couldn't stop them, only slow them down. This must have been what they were talking about.
Marked as best answer by louisfm16 9 years ago
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 3 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
While doing my map I found something that stops them (but they will continue trying to attack) and it's really simple. Don't know if it is going to have the effect you want but here's my idea:
Just link the zombies to anything and unlink them again. Like this:
Code Snippet
Plaintext
linker = getEnt( blah,blah ); // you can use anything scriptable

// grenade stuff

for( i = 0; i < zombies.size; i++ ) {
    zombies[i] enableLinkTo();
    zombies[i] linkTo( linker );
}
wait(blah); // the time to wait until they move again
for( i = 0; i < zombies.size; i++ ) {
    zombies[i] unlink();
}
broken avatar :(
×
broken avatar :(
Location: usCali
Date Registered: 11 July 2015
Last active: 7 years ago
Posts
21
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
Live and Learn
×
louisfm16's Groups
louisfm16's Contact & Social LinksPortfolio
Thanks @Soy-Yo that worked like a charm all thats left to do is make the effect, thanks again
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 3 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
Thanks @Soy-Yo that worked like a charm all thats left to do is make the effect, thanks again
You're welcome. ;) What is a bug for me, is the solution for you.
Also I forgot to say that you need to link zombies to something that is never going to be moved (with script I mean). Because there could be some idiot like me who decides to make a map where all rooms move. And if the entity you linked zombies to moves, zombies will move with it.
broken avatar :(
×
broken avatar :(
Location: usCali
Date Registered: 11 July 2015
Last active: 7 years ago
Posts
21
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
Live and Learn
×
louisfm16's Groups
louisfm16's Contact & Social LinksPortfolio
You're welcome. ;) What is a bug for me, is the solution for you.
Also I forgot to say that you need to link zombies to something that is never going to be moved (with script I mean). Because there could be some idiot like me who decides to make a map where all rooms move. And if the entity you linked zombies to moves, zombies will move with it.

thanks for the heads up but I actually found this out the hard way, my zombies where bouncing up and down on my map.
anyways I finished the widows fine perk it features what I said above and also when a zombie survives your grenade explosion it(crawlers as well) will get stuck in a web.
Spoiler: click to open...





broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
While doing my map I found something that stops them (but they will continue trying to attack) and it's really simple. Don't know if it is going to have the effect you want but here's my idea:
Just link the zombies to anything and unlink them again. Like this:
Code Snippet
Plaintext
linker = getEnt( blah,blah ); // you can use anything scriptable

// grenade stuff

for( i = 0; i < zombies.size; i++ ) {
    zombies[i] enableLinkTo();
    zombies[i] linkTo( linker );
}
wait(blah); // the time to wait until they move again
for( i = 0; i < zombies.size; i++ ) {
    zombies[i] unlink();
}

zombie.ignoreall = true;

and put a check in find_flesh() in zombiemode spawner to freeze the loop till they should be able to move again
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Freeze - to become hardened into ice or into a solid body;

Not stop chasing player and still sit there and derp out, lol.

Anyway, you could also spawn points of interest if you just want them to stay at a certain spot.  You could also continuously teleport the zombie to the same place. Looping one of the board/window reach or frustration animation, randomly, would be better for this imo, because it would look like they were stuck in something. Many ways to derp zombies.
Last Edit: October 09, 2015, 01:53:36 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 3 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
Freeze - to become hardened into ice or into a solid body; change from the liquid to the solid state by loss of heat.

Not stop chasing player and still sit there and derp out, lol.

Anyway, you could also spawn points of interest if you just want them to stay at a certain spot.  You could also continuously teleport the zombie to the same place. Looping one of the board/window reach our frustration animations would be better for this imo, because it would look like they were stuck in something. Many ways to derp zombies.

you could also set each zombies goal position to their origin that way they dont move and then play the window taunt anim. thats how they make the zombies stand in their final location during the after game intermission
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
you could also set each zombies goal position to their origin that way they dont move and then play the window taunt anim. thats how they make the zombies stand in their final location during the after game intermission

I did this in zombie_gib_on_damage under the watitill damage line and it looked pretty cool.
Code Snippet
Plaintext
self waittill( "damage", amount, attacker, direction_vec, point, type ); 
        //don't use recon, I used it for testing cause it always returns true
        if(isDefined(attacker) && attacker hasperk("specialty_recon") && (type == "MOD_GRENADE" || type == "MOD_GRENADE_SPLASH")) self thread WidowsWine();

and this above the function:
Code Snippet
Plaintext
WidowWineTimer(){
self endon("spiderweb");
wait(5);//the length of the effect
self.spiderweb unlink();
self.spiderweb delete();
self.spiderweb = undefined;
}
WidowsWine(){
self notify("spiderweb");
self thread WidowWineTimer();
if(!isdefined(self.spiderweb)){
self.spiderweb = spawn("script_model", self.origin );
self.spiderweb setmodel("tag_origin");
self.spiderweb linkto(self);
playfxontag(level._effect["switch_sparks"],self.spiderweb,"tag_origin");//i don't have spider fx so picked another looping fx
while(isDefined(self) && IsAlive(self) && isDefined(self.spiderweb)  && self.has_legs){
self animscripted("spiderstall", self.origin, self.angles, level._zombie_board_taunt["zombie"][randomint(6)]);
self waittill("spiderstall");
}
self zombie_think();
}

}

One issue I saw, with the other scripts posted here, is with the fx, they will keep playing even if the zombie is dead or gibbed. You may want to spawn something and link it, like above, to the zombie or keep moving it to the zombies origin or something to play the fx on to delete or move when the zombie is gibbed or dies.
Last Edit: October 10, 2015, 02:56:16 am by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
I did this in zombie_gib_on_damage under the watitill damage line and it looked pretty cool.

Your right, it does look cool  :D

 
Loading ...