10/13/2026 [22:44:37] GMT Home .:. Logout
Forums
Hardmaps.com :: Forums :: Map Making Forum :: Joint Operations
 
<< Previous thread | Next thread >>
TELEPORTING PLAYERS
Go to page       >>  
Moderators: Hardmaps Administrator, *HmS*Wedge, *HmS*grunt, *HmS*Trevor, *HmS*LongBow
Author Post
Executioner-BRS-
Sun Nov 09 2008
Registered Member #2259
Joined: Tue Nov 04 2008
Posts: 31
any quick solutions in nile for teleporting jops team like in STARGATE COMMAND MAP I HAVE SEEN
have tried the teleport command in nile events and used a target to send thm to but no joy i have set it so tht players are teleported to target after commanders are shot

if anyone can give me an example tht wud be great thn i can save it in my wac commands file outside of nile and use again with other SSn 'S
ty in advance

executioner
Back to top
MichaBen
Sun Nov 09 2008
Registered Member #1336
Joined: Tue Jul 25 2006
Location: Netherlands (Rotterdam)
Posts: 267
The easiest way is using a Teleport Group 1 to Target x event, but teleport targets are one of the many things that don't work in nile. There is a workaround using the ssnuse() wac command to teleport, but that won't work for all players at once. In SGMod they had a special teleport object that could hold up to 20 people and was invisible. That object doesn't exist in JO however, there you will have to use attach points like vehicles, weapon emplacements or chairs instead, which hold less people (you can't teleport more people then you have attach points with ssnuse, if you teleport somebody to a attach point but he can't attach the map will crash).

Using the PLOOP command you can loop each player and execute code for him. For example (you might need to change the trigger because as far as I remember area triggers also don't work in nile):
PLOOP
if ssnarea3d(player, 2) and !ssnride(82) then
ssn2ssn(player,82)
ssnuse(player)
endif
END

This will loop each player and check if he is inside the teleport area. Then it will check if the chair (ssn 82) is free, and if so, teleport the player to it. Then, once the player detached from the chair, the next one can teleport. You could add another player loop before this one that calls ssnrelease in case a player is sitting on the chair, then you can teleport 1 player per second.
Back to top
Executioner-BRS-
Sun Nov 09 2008
Registered Member #2259
Joined: Tue Nov 04 2008
Posts: 31
ty for such a quick reply forgot to say im new to all this if ppl not read other posts i have left lol

and call me thick if you like but what is ssnride(82)
is it a jeep for example

im a bit lost on this one to be fair maybe im in a bit deep at this stage
lol
if you explain what the numbers are (i know they are id numbers ) as in what i could use as these numbers thn might be clearer this end ty
Back to top
MichaBen
Sun Nov 09 2008
Registered Member #1336
Joined: Tue Jul 25 2006
Location: Netherlands (Rotterdam)
Posts: 267
Teleporting using ssnuse() is a bit more advanced wac scripting, so if you are new to COOP mapping this might be a bit hard to understand right away.

The ssnride(xx) command is used to check if somebody is sitting on top of an object. By using !ssnride(xxx) (the ! means not) you can check if nobody is using ssn xxx at the moment. This is required as the game will crash when you teleport somebody to an object that is either destroyed or somebody else is using it.

When you made sure the object you will use to teleport the player to is free, you can use ssn2ssn to order the player to go there, and ssnuse to attach him to it. The ssn2ssn(xxx,yyy) command has 2 parameters, xxx is the ssn of the object you want to teleport, and yyy is the object you want to teleport him to. In case you are using PLOOP, you can use 'player' as first parameter, this variable will hold the ssn of the player. As second parameter, use the ssn of the teleport object (same ssn you used for ssnride(xxx).

So the template for a teleport device is this:

if <teleport active trigger> then
 PLOOP
  if <player teleport condition> and !ssnride(<target ssn>) then
   ssn2ssn(player,<target ssn>)
   ssnuse(player)
  endif
 END
endif


You will have to fill in 3 things here:
<teleport active trigger> Replace this with the condition under which the teleport device is active (for example ssndead(2104), once ssn 2104 is killed the teleport device will be active)
<player teleport condition> Replace this with the condition under which a player will teleport (for example ssnonssn(player,252), will teleport the player when he is standing on top of ssn 252)
<target ssn> Replace this with the ssn of the object you use as teleport target, for example a chair with ssn 243.

So with these 3 example values, your code will be:

if ssndead(2104) then
 PLOOP
  if ssnonssn(player,252) and !ssnride(243) then
   ssn2ssn(player,243)
   ssnuse(player)
  endif
 END
endif



You can teleport more players at once by using more targets, and you can also force players to release to make room for others, but that will make the code even more difficult. Better start with something simple and get that working first.
Back to top
Executioner-BRS-
Sun Nov 09 2008
Registered Member #2259
Joined: Tue Nov 04 2008
Posts: 31
ty very much for this
i will test on a blank map thn if i can get it to work thn i can paste it into my map wac
Back to top
NUT ACE
Sun Nov 09 2008
picard
Registered Member #1450
Joined: Wed Oct 11 2006
Location: The Netherlands
Posts: 635
You are forgetting one thin MichaBen...

This works fine in singleplayer mode...What if 2 players stand on the target at the same time??
You'll be getting a sysdump..

NUT ACE out...
Back to top
Executioner-BRS-
Sun Nov 09 2008
Registered Member #2259
Joined: Tue Nov 04 2008
Posts: 31
dam this hard when ur new lol i thought of tht NUT ACE and put in 4 chairs ;)
and i still not moving lol

this is what it looks like in wac :-if never() and (Never() and ssnride(132079) and ssnonssn(197609,132079)) then //New Event
SSN2SSN(197609,132083)
endif
Back to top
MichaBen
Sun Nov 09 2008
Registered Member #1336
Joined: Tue Jul 25 2006
Location: Netherlands (Rotterdam)
Posts: 267
It's ages since I used this, I mostly use teleport targets because they work better and are much easier to use. But I tested a bit more, and came out with this:

if ssndead(2104) then
 PLOOP
  if ssnonssn(player,243) then
   ssnrelease(player)
  endif
 END
 v100 = 0
 PLOOP
  if ssnonssn(player,252) and !ssnride(243) and v100 == 0 then
   ssn2ssn(player,243)
   ssnuse(player)
   v100 = 1
  endif
 END
endif


This should teleport 1 player per second once the commander is dead when they are standing on ssn 252. The first loop will release players from the chair, the second loop will teleport the next player to it.

[ Edited Sun Nov 09 2008 ]
Back to top
NUT ACE
Sun Nov 09 2008
picard
Registered Member #1450
Joined: Wed Oct 11 2006
Location: The Netherlands
Posts: 635
Executioner-BRS- wrote ...

dam this hard when ur new lol i thought of tht NUT ACE and put in 4 chairs ;)
and i still not moving lol

this is what it looks like in wac :-if never() and (Never() and ssnride(132079) and ssnonssn(197609,132079)) then //New Event
SSN2SSN(197609,132083)
endif



Okay executioner....The reason why this isn't working is that you are not teleporting players.
Looking at the ID 's you are using you are trying to teleport objects instead of people..
You are mixing up your ID's...

Also you are using events to set this up...It won't work in NILE...
Teleporting of player / AI needs to be handwritten...

Have a look at MichaBens code...you'll see the difference...

NUT ACE out...
Back to top
Executioner-BRS-
Sun Nov 09 2008
Registered Member #2259
Joined: Tue Nov 04 2008
Posts: 31
i am forever in your debt ;)
i have written this into a dummy map with target numbers from orignal wac (for reference only ) thn trnsfered thm to new wac (above from MichaBen )
and it all works brilliant so now all i got to do is transfer all info to proper map wac and all should be fine

ty ty ty ty you are truly great and clever and helpful ppl
i thk you all !!!!
Back to top
Executioner-BRS-
Sun Nov 09 2008
Registered Member #2259
Joined: Tue Nov 04 2008
Posts: 31
plus if any of you would like to see my first ever coop even if you do giggle at it i can email or send on skype personally im quite proud and most of squad and ppl who have played it like it so tht all tht counts
ty all again and i hope you dont mind if i call on your assistance again should the need arise :)
Back to top
MichaBen
Sun Nov 09 2008
Registered Member #1336
Joined: Tue Jul 25 2006
Location: Netherlands (Rotterdam)
Posts: 267
Are you planning to release the first map as well, or is it just an experiment not worth for release? There is nothing wrong with that, for me my first 10 maps never made it to release, and out of the rest maybe half of the maps that I worked seriously on (meaning the layout is finished mostly) got released. But don't delete the project files even if it's just an experiment, maybe one day you can revive the project into a real map. That is what I did with a map I made ages ago and almost forgot about. After many many months I revived it, added waypoints and mission objectives, added some nasty miniguns and it was alive again. Although I still think it needs some more work, but that is more a personal problem, I always see things that can be better and things that should be updated (bit like Shadowman, who also does nothing else then updating his already great maps )
Back to top
Executioner-BRS-
Sun Nov 09 2008
Registered Member #2259
Joined: Tue Nov 04 2008
Posts: 31
if you like i will send it to you and you can see if it worth releaseing
it nothing compared to hms maps but thn hms been around lot longer thn i have even been playing games lol
ps i wont take offence if you say it c**p lmao

as it is the first and im getting to grips wiv wac still as you know lol


[ Edited Sun Nov 09 2008 ]
Back to top
NUT ACE
Sun Nov 09 2008
picard
Registered Member #1450
Joined: Wed Oct 11 2006
Location: The Netherlands
Posts: 635
Executioner-BRS- wrote ...

i am forever in your debt ;)
i have written this into a dummy map with target numbers from orignal wac (for reference only ) thn trnsfered thm to new wac (above from MichaBen )
and it all works brilliant so now all i got to do is transfer all info to proper map wac and all should be fine


Executioner...
Do you understand the code that was given? Do you know what is happening? Simply copying and pasting code will teach you nothing...

When you jump in to the pool, jump in at the shallow end and slowly wade to the deep part...That's the best way to learn..
This is pretty advanced wac coding...

NUT ACE out
Back to top
MichaBen
Mon Nov 10 2008
Registered Member #1336
Joined: Tue Jul 25 2006
Location: Netherlands (Rotterdam)
Posts: 267
Take your time to understand the code, and experiment with it. Advanced wac scripts can be up to a few hundred lines. Maps made with NILE normally have even more wac scripts then maps made with the med editor. NILE has much less features in the editor, meaning lots of stuff has to be done using wac rather then in the editor. Simply things like setting up spawn count, engagement range and attaching AI to weapons and vehicles have to be done using wac scripts as well.

That can cause really large wac files. So don't rush the scripting, understand one part before going to the next, or you will end up with a wac with 700 lines of code you don't understand, and then you have a sysdump you can't fix.
Back to top
Go to page       >>   

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
All trademarks are copyright their respective owners.
This site is best viewed using 1280-1024 screen resolution.
{THEMEDISCLAIMER}
Render time: 0.0975 sec, 0.0160 of that for queries.