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

Creating a target that zombies will attack

broken avatar :(
Created 9 years ago
by Harry Bo21
0 Members and 1 Guest are viewing this topic.
1,173 views
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
So im working on my shield again and decided to do the placement feature

I just need to know how to make zombies attack it, i can make them walk over to it with a interest point, but how would i simulate them attacking it?
Last Edit: July 12, 2015, 05:39:15 am by Harry Bo21
Marked as best answer by Harry Bo21 9 years ago
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
heres a quick script for it, not tested just quickly wrote it:

Code Snippet
Plaintext
zomb_attack_shield_think()
{
//self is the shield
while(shield.health > 0 && shield.placed) //replace with the respective variables
{
zombs =  GetAiSpeciesArray( "axis", "all" );
for(i=0;i<zombs.size;i++)
{
if(!isdefined(zombs[i].attacking_shield))
zombs[i].attacking_shield = false;
if(distance(zombs[i].origin, shield.origin) < 50 && !zombs[i].attacking_shield )
zombs[i] thread attack_shield(shield);
}
}
}

attack_shield(shield)
{
self.attacking_shield = true;
self animscripted("meleeanim", self.origin, self.angles, random(level._zombie_melee["zombie"]));

while ( 1 )
{
self waittill("meleeanim", note);
if ( note == "end" )
break;
else if ( note == "fire" )
shield.health = shield.health - 1; // replace .health woth the shield health variables
}
wait 1.5;
self.attacking_shield = false;
}

also id recimend for this to rescript the find flesh function so you can make a specific zombie go for it during certain conditions
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 6 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
ok, next question, whats the best way to spawn a clip there too?
Either use a spawnCollision or use spawn("script_model") setModel("collision----") hide();

Probably should use that method instead.

Code Snippet
Plaintext
place_juggernaut_machine()
{
machine_origin = (172, 594, 145);
machine_angles = (0, 0, 0);

machine = Spawn( "script_model", machine_origin );
machine.angles = machine_angles;
machine setModel( "zombie_vending_jugg_on" );
machine.targetname = "vending_jugg";

machine_trigger = Spawn( "trigger_radius_use", machine_origin + (0 , 0, 30), 0, 20, 70 );
machine_trigger.targetname = "zombie_vending";
machine_trigger.target = "vending_jugg";
machine_trigger.script_noteworthy = "specialty_armorvest";

machine_clip = Spawn( "script_model", machine_origin + (0, 0, 100) );
machine_clip.angles = machine_angles;
machine_clip SetModel( "collision_geo_64x64x256" );
machine_clip Hide();
}
This was adapted from the code in BO1 and how it places the Mule Kick in maps.
What you're looking for is the machine_clip code.

 
Loading ...