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 script - where enemy is hit by a bullet and re-spawnes somewhere random

Author
Message
Beast E Gargoyle
17
Years of Service
User Offline
Joined: 15th Feb 2007
Location: Sunny San Diego, CA
Posted: 16th Nov 2012 20:55 Edited at: 18th Nov 2012 06:39
Hello!

I am working on a small sample-level (game) I have been designing. I am working with a script so that when I fire the avatar's gun, and the bullet comes into contact with the enemy; then the enemy will re-spawn somewhere random in the level. This will enable strategic benefits to the user controlling the character. My .fpi script follows: Kindly feel free to give suggestions or another way you would attempt to carry out this concept?

teleportationifhit.fpi





Final Judgment Games, Inc. website can be accessed at http://fjg.jaredgingerich.com
The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 13th Dec 2012 07:04
@Beast


I changed some of it for you, but this is only something I did in seconds. What you're trying to achieve is completely possible.

You would have to get the coordinates of each teleportation spot and when the character is shot, teleport them to those coordinates by doing this:

SetVar=$EPX TeleportCoordX,SetVar=$EPY TeleportCoordY,SetVar=$EPZ TeleportCoordZ

The TeleportCoord... variables would be the positions of the teleportation spots. You'd need to use the "random" command to randomize where the character spawns.

-TZK

Beast E Gargoyle
17
Years of Service
User Offline
Joined: 15th Feb 2007
Location: Sunny San Diego, CA
Posted: 20th Dec 2012 04:10
@The Zombie Killer- Where would I find a (scripting) guide to the various locations for FPSC's re-spawn locations?

Thanks!

Beastegargoyle

Final Judgment Games, Inc. website can be accessed at http://fjg.jaredgingerich.com
The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 21st Dec 2012 01:21
@Beast E Gargoyle
You can't really get all of the spawn locations simply. You'll have to have a dummy entity somewhere on the map for each spawn location. Use this appear script for dummy entity number one:



For number two you'd change Tele1 to Tele2. You'll have to change the other script to use those variables as well.

Well, as you can see, what you're trying to achieve isn't very simple to do, but is quite possible.

-TZK

Beast E Gargoyle
17
Years of Service
User Offline
Joined: 15th Feb 2007
Location: Sunny San Diego, CA
Posted: 21st Dec 2012 16:29
@The Zombie Killer- Thanks for the reply. Gosh, well I probably can make it work, and properly implement it. The catch is that I haven't coded much of anything in FPSC, and I'm rather rusty at programming as that was taught in my college Degree's 1st year and then the next three years were well beyond the scope of just data programming.

Beastegargoyle

Final Judgment Games, Inc. website can be accessed at http://fjg.jaredgingerich.com

Login to post a reply

Server time is: 2024-11-23 17:15:36
Your offset time is: 2024-11-23 17:15:36