Page 1 of 2
Dead Players Teleported?
Posted: Wed Oct 01, 2003 2:56 am
by Virus
Hi, I was wondering if anyone had an idea on how i could make a player teleport to a certain location as soon as he dies?.. ive sorted a teleport script using triggers, But i have no idea how to make it run when he just dies, ... Please help if you can, Heres the teleport script i'am currently using with triggers :
Code: Select all
//Teleport Trigger Setup.
local.trigger = spawn trigger_multiple
local.trigger origin ( -767.41 -1010.15 560.13 )
local.trigger setsize (0 0 0) (128 128 128)
local.trigger setthread teleport
//Teleport Trigger End
//Start Of Teleport Thread.
teleport:
local.player = parm.other
local.player tele ( -2651.56 -234.88 0.13 )
local.player stufftext ("locationprint 250 250 Teleported!")
local.player dmmessage 0 ("I Have Now Been Teleported!!!")
end
//End Of Teleport Thread
Posted: Wed Oct 01, 2003 9:20 am
by The Jackal
I do not see the need for a teleport script. Besides, how will a player enter a trigger if he is dead?
Code: Select all
main:
thread coroner
level waittill spawn
coroner:
while (1)
{
wait .1
for (local.p = 1; local.p < $player.size+1;local.p++)
{
if ( $player != "NIL" && $player[local.p].health == 0 )
{
wait .5
$player[local.p].origin ( -2651.56 -234.88 0.13 )
}
}
wait .1
}
end
Posted: Wed Oct 01, 2003 12:47 pm
by Virus
Hi, thanks for your response. I now can see what you mean.. I ran the script in a map. and recived this error:
bad token:
TOKEN_LEFT_BRACKET:
(
$player[local.p].origin ( -2651.56 -234.88 0.13 ) (maps/obj/obj_team2.scr, 77)
$player[local.p].origin ^
^~^~^ Script file compile error: Couldn't parse 'maps/obj/obj_team2.scr'
ScriptMaster::GetScript: Script 'maps/obj/obj_team2.scr' was not properly loaded
Posted: Wed Oct 01, 2003 1:25 pm
by Bjarne BZR
Virus, explain what you are trying to do... my guess is that you want to re-create the liberation mode of MOH:BT.
If this is the case you should not use teleportation.
Instead:
1) Place spawn points as usual in the map.
2) Place spawn points in the jail.
3) At map start: the jail spawns should be disabled.
4) After say, 5-10 seconds: Enable the jail spawns and disable the regular spawns.
5) Done.
Hope I understand you correctly...
Posted: Wed Oct 01, 2003 2:46 pm
by Virus
Yeh!!.. you got it in one! , Wow .. thanks i never thought of that. I was going to wait till the player had 0 health, Give him 100 health and teleport him into the jail. But that ways much easier. Am i right in thinking this will work? .. give the spawn points a targetname..
$axisspawn1 disablespawn
$axisspawn1 enablespawn
Im not quite sure if i got that right. Just want to check.
Posted: Wed Oct 01, 2003 6:29 pm
by Bjarne BZR
That looks right
Posted: Thu Oct 02, 2003 1:00 am
by nuggets
i fyou have a late comer, they have a chance of being locked up, not saying that that isn't a bad thing though

Posted: Thu Oct 02, 2003 11:01 am
by Bjarne BZR
nuggets wrote:i fyou have a late comer, they have a chance of being locked up, not saying that that isn't a bad thing though

That made absolutely no sense whatsoever nuggets.
What are you trying to say?

Posted: Thu Oct 02, 2003 11:25 am
by jv_map
I read it as follows:
When a player joins later he will spawn in jail, but that is a good thing in fact
But, I may be wrong here... he may also mean:
When a player joins later he will spawn in jail which is a bad thing
But that leads to a contradiction with the smiley
Hmpf never mind... better wait for nuggets' response

Posted: Thu Oct 02, 2003 7:54 pm
by Slyk
Well, the script syntax is right. The spawner logic is about as good as it will get. I've tried a lot with that in my hybrid maps and it's a pain in the butt. I have issues with 'starting' spawns myself in that they don't always turn off when they should. Don't know why. I have, however, gotten the progressive spawn system to work great with the syntax you used and other supporting logic of when a switch can be thrown to enable/disable spawners.
My suggestion would be to have the starting spawners turn off or be removed within 30 seconds or so. You need to judge how quickly players can make their initial spawn into your map and manage to stay alive until all players make their first spawn.... Late comers, say two minutes into a round, would automatically end up staring 'in-jail'. That would be the easy way. There may be script logic that would calculate when a player joins vs. where they spawn, but is it worth it to you?
Posted: Fri Oct 03, 2003 11:07 pm
by nuggets
ok i've read it 3 times and it makes perfect sense to me, which it should as i wrote it, but just to clarify the misinformed
JV you are absolutely right, in the 1st presumption
the question about the contradiction depends on which chair your sitting in...
if your the player, then getting locked up for being late is bad

so unhappy face
but if your the scripter, then getting a player locked up for being late is good, as you've achieved what you've set out to do

so smiley face
hope my response was worth the wait and all discrepencies have been cleared up now

(smiley face again, as i think i've answered the question)
Posted: Sat Oct 04, 2003 6:52 am
by jv_map
Well I stumbled over this part

:
not saying that that isn't a bad thing though
If it isn't a bad thing, it's probably a good thing. So obviously you were not saying it is a good thing

Posted: Sat Oct 04, 2003 7:42 am
by The Jackal
OK He used a double negative in that quote you made JV.
He said/ wrote:not saying
Meaning: He is saying this it NOT the case.
Then he said/ wrote:...that that isn't..
Meaning: Is Not a bad thing but a good thing.
Therefore. Its can be rephrased to say:
I would say/ wrote:This can be a good thing
Posted: Sat Oct 04, 2003 9:15 am
by Bjarne BZR
If I were a control freak, I'd tell you to stay on topic... but as I find these WAY off topic discussions often more interesting than the original topics:
I won't not avoid to not un-tell you off.
( I have no idea if that was a correct statement

)
Posted: Sat Oct 04, 2003 10:46 am
by nuggets
lol, well i'm glad that none of it's unsorted now
but as for the that that, the 1st that is to say the next item of topic is the one being referred to, and the 2nd that is the topic that has been previously mentioned
that is just a method of transgression, where it will move what part of a sentence needed into a place it is desired so it won't need to be re-written
