Shadows of Evil Portals

broken avatar :(
Created 1358 days ago
by GrantArctix
0 Members and 1 Guest are viewing this topic.
4,121 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 23 June 2015
Last active: 1266 days ago
Posts
9
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
GrantArctix's Groups
GrantArctix's Contact & Social Links
I was wondering if anyone had or could create a script that acts as a portal like in the map Shadows of Evil. Just a simple portal would be nice too. If the player touches it they get transported to another location. If any one could help it would be greatly appreciated  :)
Marked as best answer by GrantArctix on Today at 08:46:22 pm
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 17 February 2014
Last active: 202 days ago
Posts
69
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
What is broken can be reforged
Signature
Completed maps:
Kingdom Hearts - World at War Link
Minecraft - Black ops 3 Link

WIP:
~

×
shinged's Groups
shinged's Contact & Social LinksShingedvinny545TheShingedMatarra_
I was wondering if anyone had or could create a script that acts as a portal like in the map Shadows of Evil. Just a simple portal would be nice too. If the player touches it they get transported to another location. If any one could help it would be greatly appreciated  :)

Here
function player_teleporter_init()
{
player_tp = GetEntArray( "teleport_player", "targetname" );
for( i = 0; i < player_tp.size; i++ )
{
player_tp[i] thread player_teleport();
}
}

function player_teleport()
{
destination = GetEnt( self.target, "targetname" );
while(1)
{
self waittill( "trigger", player );
player SetOrigin( destination.origin );
player SetPlayerAngles( destination.angles );
}
}

Create a trigger radius or trigger multiple then give it the KVP "teleport_player" "targetname". Now create a script origin, set its client KVP to server, and deselect it. Now select your trigger first, then your script_origin and hit w. Now you can select both and copy them as many times as you want. Changing the angle of the origin will change the player angle after tp'ing.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 23 June 2015
Last active: 1266 days ago
Posts
9
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
GrantArctix's Groups
GrantArctix's Contact & Social Links
Here
function player_teleporter_init()
{
player_tp = GetEntArray( "teleport_player", "targetname" );
for( i = 0; i < player_tp.size; i++ )
{
player_tp[i] thread player_teleport();
}
}

function player_teleport()
{
destination = GetEnt( self.target, "targetname" );
while(1)
{
self waittill( "trigger", player );
player SetOrigin( destination.origin );
player SetPlayerAngles( destination.angles );
}
}

Create a trigger radius or trigger multiple then give it the KVP "teleport_player" "targetname". Now create a script origin, set its client KVP to server, and deselect it. Now select your trigger first, then your script_origin and hit w. Now you can select both and copy them as many times as you want. Changing the angle of the origin will change the player angle after tp'ing.

Thank you very much! Also I enjoyed your minecraft map it was really well made :D
broken avatar :(
×
broken avatar :(
Location: ruMoscow
Date Registered: 21 March 2016
Last active: 217 days ago
Posts
30
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
RTCW Modder
×
Wolfplayer's Groups
First of all, thank you for this script. But it seems I am doing something wrong.
Maybe I am forgeting something but this is my steps:

1. Paste your script in the bottom of my gsc file.
2. Create trigger_multiple or trigger_radius.
3. Create KVP(for trigger) named "teleport_player" to "targetname" value.
4. Create "script_origin".
5. Set KVP(for script_origin) named "client_server" to "ServerSide" value.
6. Select trigger, then select script and link them using W key.

After this I am trying to walk through my trigger, and nothing happens. I did something wrong?
Sorry for being stupid, but I am rather new to this whole scripting thing. :-\
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2016
Last active: 171 days ago
Posts
306
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
reckfullies's Groups
reckfullies's Contact & Social LinksReckfulliesReckfullies
First of all, thank you for this script. But it seems I am doing something wrong.
Maybe I am forgeting something but this is my steps:

1. Paste your script in the bottom of my gsc file.
2. Create trigger_multiple or trigger_radius.
3. Create KVP(for trigger) named "teleport_player" to "targetname" value.
4. Create "script_origin".
5. Set KVP(for script_origin) named "client_server" to "ServerSide" value.
6. Select trigger, then select script and link them using W key.

After this I am trying to walk through my trigger, and nothing happens. I did something wrong?
Sorry for being stupid, but I am rather new to this whole scripting thing. :-\

Make sure you are calling the init script in your main function:
function mainorwhateveritscalled()
{
    thread player_teleporter_init();
}
broken avatar :(
×
broken avatar :(
Location: gbEurasian Plate, The Crust, Earth, The Solar System, The Milky Way
Date Registered: 4 November 2014
Last active: 67 days ago
Posts
178
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Favourite Languages: PHP CSS HTML JS C# SQL XSLT
Signature
Walk your Talk
×
IceGrenade's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Just released this dude... to add fx to shadows style portals :D
Last Edit: December 07, 2016, 02:57:37 am by josh1600

 

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