Run and GO Zipline

broken avatar :(
Created 1699 days ago
by jei9363
0 Members and 1 Guest are viewing this topic.
4,202 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 16 June 2013
Last active: 104 days ago
Posts
1,006
Respect
Forum Rank
Zombie Colossus
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Signature
Hey if you had tons of fun on playing my maps please [You are not allowed to view external links. Register or Login to see them] :)

play ESTATE now, and claim your mansion back from the undead!
×
jei9363's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
jei9363's Contact & Social Linksjei9363jei9363jayingardia
Zipline

go into radiant and prep your map to have a platform in one zone, overlooking another zone



add a negotiation node begin with kvps, with script_noteworthy being the end zone



add a negotiation node end with kvps. link the start node to the end node by selecting the start, then end and pressing W



add a script origin with kvps



reason for script_noteworthy


make a black cylinder, shrink it down and rotate it to angle from the start and end points of the zipline. use V to select the vertices of the ends and middle to have nice control over the geometry of your zipline. pull the middle down to get a nice slope in the line

add script_origins along the line. What I did was place all of them above the line, then used the drop down button in radiant so they would automatically drop down to the correct z height along the line.

from the first to the last, use W to link the node with the radius/zone name to node 1, node 1 to 2, and 2 to 3 and 3 to 4....



create a new .gsc file, name it maybe mapname_zipline

add this function. it will find your starting point and the origins that follow


#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_zombiemode_zone_manager;
#include maps\_music;
#include maps\dlc3_code;
#include maps\dlc3_teleporter;

zipline_init()
{

zipline = getEnt("zipline","targetname");

level.zipline_origins_1 = [];

level.cleanup = [];

stop = false;
current_node = zipline;
level.zipline_origins_1[level.zipline_origins_1.size] = zipline.origin;
while(!stop)
{
next_node = getEnt(current_node.target,"targetname");
if(isDefined(next_node))
{
level.zipline_origins_1[level.zipline_origins_1.size] = next_node.origin + (0,0,-70);
current_node = next_node;
level.cleanup[level.cleanup.size] = current_node;
}
else
stop = true;
}



thread zipline(level.zipline_origins_1,zipline.script_noteworthy);


for(i=0;i<level.cleanup.size;i++)
level.cleanup[i] delete();
}

add this function for moving players

zipline(origins,zone)
{

while(1)
{

players = get_players();

was_warned = false;

for(i=0;i<players.size;i++)
{
if(Distance(origins[0],players[i].origin)<64 && !(players[i] in_revive_trigger()) && !players[i].isDown)
if(level.zones[zone].is_enabled)
{
thread zip_me(players[i],origins);
}
else
{
players[i] iprintlnbold("Zone Not Active!");
was_warned = true;
}
}

if(was_warned)
wait 2;

wait .1;
}

}

and finally

zip_me(player,zipline)
{

if(!isDefined(player.zip_link))
{
player.zip_link = spawn("script_model",player.origin);
player.zip_link setmodel("tag_origin");
}
else
player.zip_link.origin = player.origin;
player enableinvulnerability();
player SetStance( "stand" );
player playerLinkTo(player.zip_link);



speed = 150;

for(i=1;i<zipline.size;i++)
{
time = Distance(player.origin,zipline[i])/speed;



if(i > 1)
{
player.zip_link moveTo(zipline[i],time);
earthquake(.15, 1.5*time, player.origin,128);
}
else
player.zip_link moveTo(zipline[i],Distance(player.origin,zipline[i])/600);

wait time;

speed += 50;
}

player disableinvulnerability();
player unlink();

wait 1;

player.team = "allies";
player.onElevator = false;
}

create a script in mods/mapname/animscripts/traverse, name it zombie_climb_down

add

#include animscripts\Utility;
#include animscripts\traverse\shared;
#include maps\_utility;
#include common_scripts\utility;
#using_animtree ("generic_human");




main()
{
if( IsDefined( self.is_zombie ) && self.is_zombie &&  self.type != "dog" )
{
self low_wall_zombie();
}
else if( IsDefined( self.is_zombie ) && self.is_zombie && self.has_legs == false )
{
low_wall_zombie();
}
else if( self.type == "dog" )
{
dog_jump_up(96, 7);
}
}

low_wall_zombie()
{

jump_time = .8;

traverseData = [];
//traverseData[ "traverseAnim" ] =  %ai_zombie_zip_down;

endNode = self getNegotiationEndNode();
final = endNode.origin;

path = level.zipline_origins_1;
path = array_reverse( path ); //if zombies start from opposite end remove this


zombie_link = spawn("script_model",self.origin);
zombie_link setmodel("tag_origin");
self LinkTo(zombie_link);


thread DoTraverse( traverseData );

zip_me(self,path,final,zombie_link);




}

low_wall_crawler()
{

traverseData = [];
traverseData[ "traverseAnim" ] = %ai_zombie_crawl_jump_up_2_climb;

DoTraverse( traverseData );


}

zip_me(player,zipline,final,zombie_link)
{

speed = 150;

for(i=zipline.size - 1;i>0;i--)
{
time = Distance(player.origin,zipline[i])/speed;

zombie_link moveTo(zipline[i] + (0,0,32) ,time);

wait time;

}

zombie_link moveTo(final,Distance(player.origin,zipline[i])/300);

wait Distance(player.origin,zipline[i])/300;

player unlink();
zombie_link delete();


}




tick the scripts in the mod builder and add

maps\name_or_zipline_script::zipline_init();

in _zombiemode.gsc

under

	maps\_zombiemode_blockers_new::init();
maps\_zombiemode_spawner::init();
maps\_zombiemode_powerups::init();
maps\_zombiemode_radio::init();
maps\_zombiemode_perks::init();
maps\_zombiemode_tesla::init();
maps\_zombiemode_dogs::init();
maps\_zombiemode_bowie::bowie_init();
maps\_zombiemode_cymbal_monkey::init();

compile and build!  :D


Double Post Merge: November 09, 2015, 07:43:34 pm
if you have a zombie animation from BO you can uncomment this line, and replace with your anim

//traverseData[ "traverseAnim" ]			=  %ai_zombie_zip_down;
Last Edit: November 10, 2015, 03:13:09 am by jei9363
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
User
Date Registered: N/A
Last active: N/A
Posts
N/A
Respect
Primary Group
Deleted Member
×
steviewonder87's Groups
steviewonder87's Contact & Social Links
Nice tut +1. ;)
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 259 days ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
very nice idea and since you did it , i'm thinking this will be the prison end ... Slide down to a Helipad and Escape

+1 ;) ty :D
broken avatar :(
×
broken avatar :(
Location: usunited states
Date Registered: 19 August 2012
Last active: 431 days ago
Posts
215
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Personal Quote
Mapper
Signature
Maker of Contrivance
×
Psych's Groups
Psych's Contact & Social Links
Can someone explain this in more detail? I am misunderstanding the directions and my zipline does not work

The starting script origin with the radius KVP's is what you like to new script origins that create your zipline path (in order) If you need more help just message me. I can assure you this tutorial does work I have implemented it twice.
Last Edit: December 31, 2015, 05:07:16 am by Psych
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 5 hours ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
respect the dead

donates greatly appreciated :) [You are not allowed to view external links. Register or Login to see them]
discord server:
[You are not allowed to view external links. Register or Login to see them]
×
death_reaper0'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.

can anyone help me with this?

EDIT: nevermind, i fixed it
Last Edit: May 29, 2016, 05:53:01 am by death_reaper0

 

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
Loading ...