Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Teleportation Through Variables ?

Author
Message
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 23rd Mar 2012 05:28 Edited at: 23rd Mar 2012 05:29
I was looking through some old thread and found this system to be interesting.

http://forum.thegamecreators.com/?m=forum_view&t=188263&b=23

I've tested this and it works perfectly, however, I find some things about it very impracticable at the moment. The game I'm working on now does not allow the player to use doors and I simply need him to teleport from room to room when he enters a zone and uses the action key. Current FPSC teleport scripts are a mess to work with. You get stuck in the wall or thrown across the room. The script system in the pack above moves people to spots using variables but it does not throw the player like a ragdoll. It simply moves the player to a determined spot in a clean way.

Now I don't understand variables as much as I would like and I'm not quite sure how the scripts above do what they do how they do it just yet. It simply begs the question however, can a clean teleport system be done in a way the placement is done in the above scripts? It would certainly help a lot of people to have a clean teleporting system. I know for the sake of my game, I'm really needing something like this. I can do a pretty decent amount of my own scripting but I do need someone who knows better then me for this.

Thanks

PC Specs: AMD X4 2.7Ghz, 8GB DDR3 RAM, Nvidia 9800GT, Win. 7 Pro 64 Bit
007
13
Years of Service
User Offline
Joined: 22nd Aug 2011
Location:
Posted: 23rd Mar 2012 12:01
Hello my friend,

Curiously, yesterday i was looking at this same script. Not because i am using it on my game, but because i always download scripts here to study, and by the way, i was curious how this script was done.

From what i have seen on those scripts is that they use this basic command:

:state=0,plrwithinzone=1:nextlevel=2,setvar=PrevLvl 1,suspend

So it uses variables to "set" the level, and then after checking this variable number it "teleports" the player to the specific level number.

I think yes, this can be done and will be very usefull, but i don`t know if fpsc will, in example, "reload" (or respawn) all the enemies that where already killed on a previous level.

But even if so, you can use, in example, trigger zones to spawn enemies and use a variable called "killed" (i.e), so whenever an enemy is killed, will set the variable to 1 (setvar=killed 1).

And the trigger zone that will spawn this enemy would need to have a condition like this:

:state=0,plrwithinzone=1,varequal=killed 0:activateifused=1

It would take a lot of work, but i think is doable.

Hope gave some ideas,

Cheers,

007.

Goldenye 007 N64
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 23rd Mar 2012 18:20 Edited at: 23rd Mar 2012 18:22
Hmmm. Thanks for the input. I see what you are saying and it seems like it could help a lot of people. For the purposes of what I was using it for however, I have a bigger level for exploration and littler levels for the building a player goes in. I found the system to be good for that purpose but with an inventory system and multiple trigger zone, it looks like I will be setting variables for everything, all the live long day (so to speak).

What gets me is how the script knows where to place you. The start point is at the other side of my map (shoot, even 1 1/2 floors below my level 2-1 entrance point) and when I spawn in the variable determined point, I don't get stuck or thrown.

Now I know you name a certain zone "SPx" where X is the previous level number. I don't see mention of this in the scripts where the script knows to place you in that spot based on leaving the last level. I know the script is a way to "surf" levels but I feel like the creator has a clean teleport system underlying in his system. I hope you guys get what I'm saying. I don't want to travel levels but only use trigger zones to place the character in a new spot.

I think I need to show some screenshot of what I'm doing. The rooms I'm using teleportation through are not 1x1 rooms but yet I always get stuck by the physics propulsion.





This is how its set up for the level traveling system. It works fine to travel between levels smoothly. However, teleporting through the wall without this system leaves me stuck.

Maybe someone can create a better in-level teleport system by studying how the placement system work in the scripts
above. That is what I am looking for.

PC Specs: AMD X4 2.7Ghz, 8GB DDR3 RAM, Nvidia 9800GT, Win. 7 Pro 64 Bit
Tax 78
15
Years of Service
User Offline
Joined: 23rd Sep 2009
Location: Italy
Posted: 23rd Mar 2012 19:01
@ASTEK
My English is not good, I use a translator, so it's hard for me to understand.

See if you can help:http://forum.thegamecreators.com/?m=forum_view&t=189751&b=23&msg=2263021#m2263021

Tax

Sorry but I use a translator
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 23rd Mar 2012 20:19 Edited at: 23rd Mar 2012 20:19
Tax, I love you. That is EXACTLY the kind of system that would work for me. I'm glad someone who knows what they are doing got it done.
One question though. Would this work with your backpack system?

This is VERY GOOD work.

PC Specs: AMD X4 2.7Ghz, 8GB DDR3 RAM, Nvidia 9800GT, Win. 7 Pro 64 Bit
Tax 78
15
Years of Service
User Offline
Joined: 23rd Sep 2009
Location: Italy
Posted: 23rd Mar 2012 22:52
I just tested it works, but you need to make small changes to the variables, if you need to ask

Tax

Sorry but I use a translator

Login to post a reply

Server time is: 2024-11-24 02:32:10
Your offset time is: 2024-11-24 02:32:10