Page 1 of 2

A question for my helpful friends; Level triggering.

Posted: May 24th, 2010, 11:36 pm
by RonnieNeeley
Well, my friend was looking around sandbox and noticed that you couldn't use the teleport in the Trainmap in RPG mode.

It is possible to do this though I assume, by this code:
level_trigger_2 = [echo "*message*"; endsp; sleep 1000 [map *name*]]

(I apologize by not trying it myself, I have the code but haven't the wildest clue where to place it >.>)

Anyways, thanks guys.

Re: A question for my helpful friends; Level triggering.

Posted: May 25th, 2010, 12:19 am
by AndyLangel
Well, it seems i have found a solution- Rather using that code, is the proper way to trigger level changing through setting an entities tag number and then setting that tag equal to the map?

I see that this is what was done in the Train map- now that i look through the level CFG. Though, is this only for FPS, or is the reason it is only for FPS because it loads the maps with the sp prefix?

Any help would be greatly appreciated.

Re: A question for my helpful friends; Level triggering.

Posted: May 25th, 2010, 12:34 am
by AndyLangel
After a little bit of tweaking and messing around, i have managed to get teleporting to work. (You must set the entities type to 2 or something, and then set the tag to a number- then go into your map script and type "level_trigger_*number* = [map "*Map Name*"])

Aside from this, i was wondering if i could get some help with possibly making this process more RPGish...

I am looking for a way to make the user have to interact with an item to teleport, or when the user gets so close to the item, it triggers a GUI menu that asks them if they would wish to go to the other map. Also, would there be a way to trigger this GUI menu with code rather than entities? say the player get so close to the map edge, so the code executes and the player can teleport to the next map.

Ill keep looking into it and post any findings, but i would appreciate any help once again.

Re: A question for my helpful friends; Level triggering.

Posted: May 25th, 2010, 8:41 am
by arcones
Well, I'll dissect all the questions, and try to answer them all :P
Ronnie wrote:Well, my friend was looking around sandbox and noticed that you couldn't use the teleport in the Trainmap in RPG mode.

It is possible to do this though I assume, by this code:
level_trigger_2 = [echo "*message*"; endsp; sleep 1000 [map *name*]]
Unless you code the teleport in, you can't use it in RPG mode. But you can do map teleports by using the script you have :)

As for where you put this, try entering edit mode and hitting F6. That should bring up the in-game config (if not, try F7 :roll: ).

Now for Andy's questions!
Andy wrote:Well, it seems i have found a solution- Rather using that code, is the proper way to trigger level changing through setting an entities tag number and then setting that tag equal to the map?
So I'm guessing you saying that if the level trigger is set to "x" and making sure it's the same with the map "x"? It really is just simpler to code in as you can place any map you want with any message you want in between the asterisk! ;) Btw, don't forget to remove those 8-)
Andy also wrote:I see that this is what was done in the Train map- now that i look through the level CFG. Though, is this only for FPS, or is the reason it is only for FPS because it loads the maps with the sp prefix?
My answer for that would be that FPS allows teleporting and RPG doesn't. However, if it has something to do what type of game mode your in (single player, co-op edit, banana relay, capture the banana, etc.) then there might be something that works.
Andy also wrote:I am looking for a way to make the user have to interact with an item to teleport, or when the user gets so close to the item, it triggers a GUI menu that asks them if they would wish to go to the other map. Also, would there be a way to trigger this GUI menu with code rather than entities? say the player get so close to the map edge, so the code executes and the player can teleport to the next map.
It's very possible actually. It'd require some if variables and the teleporting code along with some dialog. (dialog being the hardest for me :roll: ) But no, it shouldn't be too hard.

Code: Select all

"level_trigger_1" = //enter script for dialog here (maybe use Chaze's tutorial)
//have "yes" or "no" buttons and depending on which you want, have yes teleport and no close the dialog box.

r_say "Would you like to teleport to Middle?"
r_respond "Yes." [echo "*message*"; endsp; sleep 1000 [map *name*]] //I don't know if this'll work for sure...
r_respond "No." cleargui
That's for dialog.

If you want just to set the level_trigger at the edge of the map so that you just teleport, that's easy as well!

Code: Select all

"level_trigger_2" = [echo "*message*"; endsp; sleep 1000 [map *name*]]
//now, to make this work use the following steps.
//1 Make a map model (preferably the first mm)
//2 Make the mm a "null" map model by making it a negative one (click the mmodel and scroll so that there isn't one there)
//3 Make the level trigger a 2 and put the code from up above in the in-game config.
//4 SAVE IT =P
//5 Then try it 
Something like that I'd assume :)
Hope that helps!

Arc :geek:

Re: A question for my helpful friends; Level triggering.

Posted: May 27th, 2010, 6:02 am
by Leo_V117
NO!!! Arcones...
step 4: Save Map.
step 5: Test it.

Re: A question for my helpful friends; Level triggering.

Posted: May 27th, 2010, 8:25 am
by arcones
Oh, well, if that's it... I'll change it :) :P

Re: A question for my helpful friends; Level triggering.

Posted: May 27th, 2010, 3:33 pm
by Venima
And I thought I was the coder guy XD

Re: A question for my helpful friends; Level triggering.

Posted: May 28th, 2010, 4:51 am
by Leo_V117
You are... you just code the complicated stuff. How are those Achievements coming along?

Re: A question for my helpful friends; Level triggering.

Posted: May 28th, 2010, 9:36 am
by arcones
lol

I'm gonna need to brush up on CS because Middle coming on fast! :P

So hopefully I'll be even more help!

Re: A question for my helpful friends; Level triggering.

Posted: May 28th, 2010, 10:48 am
by Venima
Leo_V117 wrote:You are... you just code the complicated stuff. How are those Achievements coming along?
ahh...those....ummmm

they're coming along.....fine.....just fine...

:lol:

Yeah I have thought about them but I've been too busy with college work. 3 weeks left with 2 months worth of work. I'll give em a go now though.