10/14/2026 [01:05:28] GMT Home .:. Logout
Forums
Hardmaps.com :: Forums :: Map Making Forum :: Joint Operations
 
<< Previous thread | Next thread >>
Teleporting
Moderators: Hardmaps Administrator, *HmS*Wedge, *HmS*grunt, *HmS*Trevor, *HmS*LongBow
Author Post
Bloodhound1222
Fri Nov 09 2007
Registered Member #1907
Joined: Fri Nov 09 2007
Posts: 6
I have been playing JO/IC for about a year and I have just started to build my own maps for gamers. I have a few questions for someone about teleporting. I use Xtasy Jo_IC4 and I cannot get my teleporting to work . I have not found anything in the mission editor manual on events or triggers conserning teleporting I have even looked in Niles manual and no luck there either. If someone could give me a "sample" I could get past this and get a few more clicks down my path of map building I have : event: (0) event 0 IF: (0) group 0 reaches waypoint 1,0 and
(1) Group is within area 0 and
(2) event 0 has been triggered
<<< new Trigger>>>

Then: (0) Teleport group 0 to target 1
(1) Teleport group 0 to target 1
(2) Teleport group 0 to target 1
<<< new Action >>>
My waypoint is in place and my teleport target is also in place.
Thanks


Back to top
NUT ACE
Fri Nov 09 2007
picard
Registered Member #1450
Joined: Wed Oct 11 2006
Location: The Netherlands
Posts: 635
Hmm looks to me you're working with Xmed? Or are you using the events from N.I.L.E??

If you're using the event's from NILE you can stop right away. These don't work. Simply because N.I.L.E can't handle them properly...

As I'm only using N.I.L.E in combination with Nile's Little Helper, and I never worked with Xmed, I can only help you with N.I.L.E..

Teleporting within N.I.L.E. can be down via handcoding your WAC. It isn't easy but it works like a charm. Even with Groups.
Because the events from N.I.L.E can't handle groups. you'll have to aproach this through another way.

You'll have to use the PLOOP or GLOOP function. As this is a bit complicated I would first like to know which level editor you're planning to use...

NUT ACE out...
Back to top
Bloodhound1222
Fri Nov 09 2007
Registered Member #1907
Joined: Fri Nov 09 2007
Posts: 6
I am using the Xmed I downloaded for this site. It is called "Xtasy Jo_IC4"It seems pretty easy because it fills in the "if & Then" for you by a drop down menu but the I am not sure what to put in the statements
Back to top
*HmS*Trevor
Fri Nov 09 2007

Registered Member #35
Joined: Tue Dec 30 2003
Location: Lincolnshire England
Posts: 2080
Have a look at this , made with Xmed for IC, maybe Ace can post the wac code for the ploop.
Back to top
Bloodhound1222
Sat Nov 10 2007
Registered Member #1907
Joined: Fri Nov 09 2007
Posts: 6
Thanks Trevor I lookit over and try it.
Back to top
Bloodhound1222
Sat Nov 10 2007
Registered Member #1907
Joined: Fri Nov 09 2007
Posts: 6
Trevor THANKS That was a big help! I am going to work on the map this week end. this is just what the Dr ordered. I have made about 3 TKOH maps I will submit after this one is done.
Back to top
*HmS*Trevor
Sat Nov 10 2007

Registered Member #35
Joined: Tue Dec 30 2003
Location: Lincolnshire England
Posts: 2080
PLOOP
if ssnnearssn(player,11,1) then // if player near concrete block - player,object ssn, distance
if not ssnride(10) then // and if no-one on chair (ssn)
ssn2ssn(player,10) // send player to chair
ssnuse(player)
endif
endif
if ssnonssn(player,10) then // if player on chair
ssnrelease(player) // release player from chair
endif
END

Cool, my example for xmed only moves the whole blue team, the code above should move just the player near the object.

[ Edited Sun Jan 31 2010 ]
Back to top
*HmS*Trevor
Sat Nov 10 2007

Registered Member #35
Joined: Tue Dec 30 2003
Location: Lincolnshire England
Posts: 2080
Updated zip file
Back to top
NUT ACE
Sat Nov 10 2007
picard
Registered Member #1450
Joined: Wed Oct 11 2006
Location: The Netherlands
Posts: 635
*HmS*Trevor wrote ...

PLOOP
    if ssnnearssn(player,11,1) then  // if player near concrete block - player,object ssn, distance
        if not ssnride(10) then  // and if no-one on chair  (ssn)
        ssn2ssn(player,10)      // send player to chair
        ssnuse(player)
    endif

    if ssnonssn(player,10) then     // if player on chair
        ssnrelease(player)     // release player from chair
    endif
END


Cool, my example for xmed only moves the whole blue team, the code above should move just the player near the object.



In theory this should work... Nice peace of code Trevor...
There is only one if to it...

if ssnnearssn(player,11,1) then


If there are two or more players at the same time near the concrete block...they will be teleported at the same time
to the same target (chair) this will give you a sysdump...
I know you've put in a safeguard for someone sitting on the chair..But still, this could happen without someone sitting on the chair..

NUT ACE out...

Back to top
*HmS*Trevor
Sun Nov 11 2007

Registered Member #35
Joined: Tue Dec 30 2003
Location: Lincolnshire England
Posts: 2080
As you know Ace the trigger is irrelevant I could have used ssnonssn!

Wheres you example? The above code comes from a working map.

[ Edited Sun Nov 11 2007 ]
Back to top
NUT ACE
Sun Nov 11 2007
picard
Registered Member #1450
Joined: Wed Oct 11 2006
Location: The Netherlands
Posts: 635
*HmS*Trevor wrote ...

The above code comes from a working map.


Aha...but I never said your code didn't work..there's only a chance that it will produce a sysdump..

But here's my 2 cents worth...

I'll explain what is gonna happen..

this bit is pretty easy..You have to make sure, before any player is teleported that the target is free.
   PLOOP
       if ssnonssn(player,66610) then \\ first making sure the target is empty
               ssnRelease(player)  \\ releasing any player who is on the target
       endif
   END


Next, to ensure only 1 player is teleported (there could be more present on the trigger at the same time...)
you have to place the player inside a variable (yes this is possible).
As a variable only can hold one player, only one player is teleported.

    PLOOP
        if ssnonssn(player,66561) then \\ if a player is on the trigger
            v10 = player    \\ placing player in variable
        endif
    END


Now I could have placed the teleport inside the PLOOP. But to avoid to much strain on the engine you could make sure the PLOOP only activates when somebody is on the trigger.
Otherwise the PLOOP would keep cycling during the time your map is running..

   if ssnride(66561) then \\ only if any player is on trigger plate then activate ploop
       PLOOP
           if ssnonssn(player,66561) then \\ same trigger
               v10 = player    \\ placing player in variable
           endif
       END
       ssn2ssn(v10,66610) \\ setting direction to where player in variable should go
       ssnuse(v10) \\ teleporting player in variable
   endif


Now to put it all in the right context...

   PLOOP
       if ssnonssn(player,66610) then
                  ssnRelease(player)
       endif
   END
   if ssnride(66561) then
       PLOOP
           if ssnonssn(player,66561) then
               v10 = player    
           endif
       END
       ssn2ssn(v10,66610)
       ssnuse(v10)
   endif


I have tested this in a multiplayer map with some of my friends, It works like a charm...
The added bonus to this is that each player has to step on the trigger in order to be teleported.
This can be done one by one, doesn't have to be at the same time.
Even if all players are present on the trigger at the same time, they are still teleported one by one..
This is just to make sure no sysdumps will occur..

NUT ACE out..
Thanx Oldman for teaching me this great stuff.....

Back to top
Bloodhound1222
Mon Nov 19 2007
Registered Member #1907
Joined: Fri Nov 09 2007
Posts: 6
I have played with the example you gave me and I have been able to teleport people ...I haved tried only to teleport red or blue team and I can not get it to work for me and when my teammates are it the sampe teleporting they can not activate the "near" teleport that I made??
I will try and send my sample here
Thanks
Back to top
Godfather
Tue Nov 10 2009
Registered Member #2482
Joined: Tue Nov 10 2009
Posts: 6
*HmS*Trevor wrote ...

PLOOP
if ssnnearssn(player,11,1) then // if player near concrete block - player,object ssn, distance
if not ssnride(10) then // and if no-one on chair (ssn)
ssn2ssn(player,10) // send player to chair
ssnuse(player)
endif

if ssnonssn(player,10) then // if player on chair
ssnrelease(player) // release player from chair
endif
END

Cool, my example for xmed only moves the whole blue team, the code above should move just the player near the object.


Missing and endif
Back to top
devilmedic
Wed Apr 11 2012
devilmedic
Registered Member #2718
Joined: Sun Jan 02 2011
Posts: 15
ok im alittle lost is there a way in nile via the trigger tab?

what im trying to do is get the player who attaches to a chair to be teleported to a teleport marker this is for a ESC/AW2 TDM and i need to use this so the players can attach to the gun batterys of the Battlestar Galactica

[ Edited Thu Apr 12 2012 ]
Back to top
___________________
Mon Apr 28 2014
Registered Member #2938
Joined: Fri Mar 21 2014
Location: Banks of the Styx
Posts: 130
NUT ACE wrote ...


the PLOOP would keep cycling during the time your map is running..


   [b]PLOOP
       if ssnonssn(player,66610) then
                  ssnRelease(player)
       endif
   END[/b]




• You can use the variable for shortest code possible:



• Or use a trigger for the loop, fool



[ Edited Fri Mar 10 2023 ]
Back to top
 

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.1389 sec, 0.0192 of that for queries.