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 Product Chat / Any way to make teleporting enemies?

Author
Message
Belacios
11
Years of Service
User Offline
Joined: 11th Nov 2012
Location: Otherworld
Posted: 11th Oct 2014 01:32 Edited at: 11th Oct 2014 01:33
I have an open map that covers all the squares of the "test level", I want to know if there's any script to make a enemy teleport from time to time.

He doesn't need a specific point, just teleport randomly around the map, sometimes he may teleport closer to the player or a little far depending on your luck.

Thanks in advance.

http://www.indiedb.com/games/sem-sada-no-way-out
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Oct 2014 18:45
I don't know of any way to transport AI to a random location. Much has happened to FPSC that I'm sure I'm not aware of, but to my understanding the best you'll do is to spawn AI in pre-selected locations. While this can appear to be random, you'll still need to place the AI in those locations as you construct the level. Then spawn them randomly.

Unless there is a new command that let's you spawn AI at a given entity??

Brian.

Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 27th Nov 2014 19:06
Im curious, if you can flip dynamically between textures now, couldnt you just move the entity normally using a transparent texture then when the player is supposed to see them they revert to their original 'visible' texture so they can be seen then when they 'teleport' switch out to the invisible texture, turn off collision and then move them to where they need to be?

This method would enable the use of waypoints to predetermine the entities path along with rotatetoplr commands to make sure its facing the player when it becomes 'visible' again?

Like xplosys says lot has changed in fpsc, ive only recently upgraded to v1.20 and im still wide eyed and awestruck at the level of options available to use and after a 6 year hiatus Im back at the keyboard once again

anyway, hope this helped

smoke em if you got em
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 27th Nov 2014 23:22
There is no command that allows an entity to teleport randomly. You could however create a "master" script attached to a trigger and allow the script to control entity(ies) by way of the command "random=x". For example...

1. Design your level. Let us pretend you place an entity on layer 5 dead center of the grid and called it "enemy1". A second enemy is placed on layer 8 top left corner and is called "enemy1l8t1". A third is placed on the 2nd layer bottom right corner and we call it "enemy1l2t2".
1. Master script uses "settargetname=enemy1",activatetarget=1" to focus on the entity on the map called "enemy1" and spawn it (providing you know how to set the entity to spawn when called).
2. Entity "enemy1" is spawned on the map where you placed it. The script for "enemy1" also needs to have a spot where it will check for a value passed to it, whether a variable or other method (such as "activated=1", "activated=2", etc.
3. Master script next will proceed with the "random=x" command. This command is as follows...



Along with this state you can script the random value then proceed to where you need to go. For example, "random=1" ensures a 50% chance you will go to the next spot you specify. The master script would then use the "settargetname=enemy1l#t#" according to what you point to.

The short of it is, with no direct command for random teleporting, you can achieve a work-around that "gives the illusion" using what is available providing you understand the script syntax.

There's no problem that can't be solved without applying a little scripting.
gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 27th Nov 2014 23:44 Edited at: 27th Nov 2014 23:45
I have a suggestion that might be of use to you. Rather than trying to make one teleport to random locations why not simply make one suddenly appear as the player walks into a trigger zone?

--------
DBP Archive

Login to post a reply

Server time is: 2024-04-20 04:48:23
Your offset time is: 2024-04-20 04:48:23