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 / "If Used" field for enemy-type entities.

Author
Message
Medium Rare
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 19th Mar 2009 00:56
I was looking at an old topic as part of an effort to get keys to teleport to the player on dying; the problem is that enemies do not have an 'If Used' field.

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

I have a key set up so that it's taken by the player when activated, so I can have a trigger zone (When it's conditions are fufilled0 give up the key; but there's no "Enemy dies in zone" trigger, so, I was looking for either a way for the enemy's death to be a trigger action or a way for the enemy to be able to trigger another entity of any kind, hopefully the key but a trigger zone would also work. I'm using 1.08, if that helps.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Mar 2009 17:37 Edited at: 20th Mar 2009 17:42
In the NPC's main script you need to use the following commands:

settargetname
settarget
activatetarget


settargetname is the name of the target you want to activate. Then you need to set the target by the settarget command. Finally when you want to activate the entity you use activatetarget giving it the value of the activation number.

settargetname=entityname
activatetarget=1 or whatever activation number you want to use. It is always one (1) if you want to spawn the entity.

BTW, when I first started using FPSC and came across this issue I went into the character's (NPC's) fpe file and included an ifused= line. Then I discovered these commands. I think Plystire introduced me to these commands. This is the best way to do it and you will find that you can use this when you need to activate more than one entity using one entity.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC

Login to post a reply

Server time is: 2024-11-24 21:37:28
Your offset time is: 2024-11-24 21:37:28