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 / Key script

Author
Message
moogle man
17
Years of Service
User Offline
Joined: 16th May 2007
Location: Gumdrop lane, candy land
Posted: 7th Jul 2007 07:54
Hello im wondereing if anyone can help me with this scripting problem i have, you see im tryin' to make a script so when you kill an enemy a key appears but the problem is characters don't have an "if used" field like boxes and things so could someone help me

the wombat watches you all
incense
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 7th Jul 2007 12:53
I also have been toying with this idea. It would be nice to have an "If Used" box for NPCs. I have had no success in getting a script to work for this. I will be watiching this thread to see where it goes.

The person that now knows the most started with many questions. Patients and tolorance are the keys to the passage of knowledge. http://gamedesigntech.byethost7.com/
Clone Gaming Prouductions
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: florida
Posted: 8th Jul 2007 00:17
Too bad you can't have an enemy hold an entity, such as a key or radio. That would solve this problem.


Come see the WIP!
TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 9th Jul 2007 11:44 Edited at: 9th Jul 2007 11:45
I have found a solution of sorts to this problem.

Add a charcter to a game and then the key. You will have to design the room/level so the character cannot move too far from the key position (or make the character static and put the key near it). Give the key a name and refer to this name where you see any reference to key below.

Change the key properties so 'Spawn At Start' value is No

Make a copy of the characters fpe file (I always do this as a precaution when changing stock media files) you want to put in your game.

Open up the characters fpe file in Wordpad.

In the ;ai section, add the line ifused = key

Change the Destroy script of the character to activateifused

When you play the game, shoot the character and the key will appear.

Thats as far as I've got.

The one thing I'd like to do is have 5 enemy in a room. Shoot all enemy, door opens. I can do this with 1 enemy but not more than 1.
moogle man
17
Years of Service
User Offline
Joined: 16th May 2007
Location: Gumdrop lane, candy land
Posted: 24th Jul 2007 13:23
Thx guys, oh and Tzap thats because scripts are generalized so you can't put in
,colonel x1=destroyed,colonel x2=destroyed:state=2
:state=2:opendoor

that would be to specific for this particular engine to handle

the wombat watches you all
TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 24th Jul 2007 22:04
Found solution moogle man. Its posted in the thread titled 'shoot enemies to open door'
moogle man
17
Years of Service
User Offline
Joined: 16th May 2007
Location: Gumdrop lane, candy land
Posted: 28th Jul 2007 09:36
gee, thx TZap ur a life saver!

the wombat watches you all

Login to post a reply

Server time is: 2024-11-23 20:55:58
Your offset time is: 2024-11-23 20:55:58