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

Spawn on top of the map?

broken avatar :(
Created 12 years ago
by Dust
0 Members and 1 Guest are viewing this topic.
3,049 views
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Okay I got this weird problem with my map. Basically i tried making a script where the players will teleport after hitting a trigger and its only the player who hits the trigger not everyone. I edited the teleport script and changed it from players to self thinking it would work, because players i know will work on all the players, self only works on 1 player so figured it would work, but guess not cause this happens


Also has save and quit on the menu


here is my script, i already threaded it and got the triggers set up and thats all fine
Code Snippet
Plaintext
teleport()
{
teleport_struct = GetStruct("teleport_trap", "targetname");
self setorigin(teleport_struct.origin);
self setplayerangles(teleport_struct.angles);
self shellshock( "explosion", 4 );
self shellshock( "electrocution", 4 );
self playsound("whoosh");
wait 5;
teleport_trigger = getent("trap_teleport","targetname");
teleport_trigger enable_trigger();
}
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
How are you calling the script exactly? if you just call it as is it will teleporter the player regardless of anything else.
Last Edit: May 23, 2014, 11:42:25 pm by daedra descent
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
How are you calling the script exactly? if you just call it as is it will teleporter the player regardless of anything else.

I call it on the trigger, here is the script of it

Code Snippet
Plaintext
 teleport_trigger = getent("trap_teleport","targetname");
  teleport_trigger setCursorHint("HINT_NOICON");
  teleport_trigger setHintString("Press &&1 to Teleport");
  teleport_trigger waittill("trigger",player);
  teleport_trigger disable_trigger();
  thread teleport();
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
I call it on the trigger, here is the script of it

Code Snippet
Plaintext
 teleport_trigger = getent("trap_teleport","targetname");
  teleport_trigger setCursorHint("HINT_NOICON");
  teleport_trigger setHintString("Press &&1 to Teleport");
  teleport_trigger waittill("trigger",player);
  teleport_trigger disable_trigger();
  thread teleport();

Self isn't defined then. You need to defined what player(s) are using the trig, and then call the teleport() functions with them.

in other words you need something like this:

Code Snippet
Plaintext
players = get_players();
 teleport_trigger waittill("trigger",players);
players thread teleport();
Last Edit: May 23, 2014, 11:49:43 pm by daedra descent
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Deadra it would work just doing
Code Snippet
Plaintext
player thread teleport();
instead of
Code Snippet
Plaintext
thread teleport();
Last Edit: May 23, 2014, 11:50:39 pm by PROxFTW
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Self isn't defined then. You need to defined what player(s) are using the trig, and then call the teleport() functions with them.

in other words you need something like this:

Code Snippet
Plaintext
players = get_players();
 teleport_trigger waittill("trigger",players);
players thread teleport();

Tried that but still got same problem
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Tried that but still got same problem
In you original script change thread teleport(); to player thread teleport();
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
In you original script change thread teleport(); to player thread teleport();

Still same problem :/
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
"save and quit"

Oh. in your mapname.gsc where/how is the function called?
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
"save and quit"

Oh. in your mapname.gsc where/how is the function called?

Before zombiemode::main, first had it set up as init() to start the script, and it was called in _zombiemode. changed it to main and now when i try to launch it up it has the compass which wasnt there before
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Before zombiemode::main, first had it set up as init() to start the script, and it was called in _zombiemode. changed it to main and now when i try to launch it up it has the compass which wasnt there before

Just as i had thought. By calling the script there its preventing other zombiemode scripts from init'ing. Making the game think your map is a SP map.

Place the functions in your mapname.gsc and call it with:

Code Snippet
Plaintext
level thread FUNCTION();

function is the name of the functions name of course.
Last Edit: May 24, 2014, 12:06:53 am by daedra descent

 
Loading ...