Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: HyperFirez on January 02, 2017, 05:02:02 am
Title: How do you specify a player?
Post by: HyperFirez on January 02, 2017, 05:02:02 am
In my script I am trying to get a specific player to be teleported when they activate the "Anywhere But Here" gobblegum. I tired using player = getplayers(); but that is giving me a syntax error...
Title: Re: How do you specify a player?
Post by: death_reaper0 on January 02, 2017, 07:04:57 am
In my script I am trying to get a specific player to be teleported when they activate the "Anywhere But Here" gobblegum. I tired using player = getplayers(); but that is giving me a syntax error...
if its from anywhere but here you should have the player activating it calling the script already. just have the player running it as "self"
Title: Re: How do you specify a player?
Post by: HyperFirez on January 02, 2017, 04:34:02 pm
if its from anywhere but here you should have the player activating it calling the script already. just have the player running it as "self"
Thanks man. I saw your "Nightclub" map & I love your Gobblegum system! Would it be possible to do a system like in Bo3 with menus instead of loading another map? (I'll do it either way, I am just curious). Double Post Merge: January 02, 2017, 04:39:54 pmRight now I have a struct with the targetname "abh_tele". Would I use getEnt to get the location's name? (This is my entire script if it helps any: http://paste.md-5.net/qinocenixo.coffee (http://paste.md-5.net/qinocenixo.coffee)) (Also, sorry for all the questions)
Title: Re: How do you specify a player?
Post by: death_reaper0 on January 02, 2017, 07:01:10 pm
id say do it like this
and call anywhere_but_here_init(); from the scripts init, or wherever so it starts when the level does. i'm pretty tired right now (just pulled an all nighter) so there may be a script error. anyway, that ent you were using, make sure its a script origin and you can have as many as you want, it will only teleport the player to any "activated" ones (ones a player has been near at some point) because of that, you should have like, one per room and make sure it isnt too close to another zone, or on the edge of one, should be somewhere the player is likely to walk across
Title: Re: How do you specify a player?
Post by: HyperFirez on January 02, 2017, 07:59:14 pm
Thanks for your help!
EDIT: Bad Syntax on: abh_tele = GetEntArray("abh_tele","targetname"); EDIT2: I moved abh_tele = ... above teleport_points = [], and now it is saying bad syntax on teleport_points = [];
Title: Re: How do you specify a player?
Post by: BluntStuffy on January 02, 2017, 09:25:20 pm
EDIT: Bad Syntax on: abh_tele = GetEntArray("abh_tele","targetname"); EDIT2: I moved abh_tele = ... above teleport_points = [], and now it is saying bad syntax on teleport_points = [];
This line is missing a semicolon ; That's why you get the error
Title: Re: How do you specify a player?
Post by: HyperFirez on January 02, 2017, 09:48:32 pm
also with how you set it up its gonna happen as soon as its taken from the machine
I did that so it doesn't randomize the chances to get it & I can directly test a specific one. Double Post Merge: January 03, 2017, 01:33:34 pmIt works now, thanks again!