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 / Can you utilize input from Entity Property fields?

Author
Message
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 5th Nov 2013 19:16
The loopsound= Function can be used in two ways. Either have a permanent link like loopsound=audiobank/soundfx/sound001.ogg

OR you can link an input of an entity property window marked as sound0 and sond1 by putting $0 after the loopsound=

loopsound=$0

So this means that FPSC can in fact fetch information from the input fields of the entity properties.

My question is - can you make the FPI script fetch other input fields of the entity property? New fields can be created in the FPE of the entity.

Isenstadt Studio: http://isenstadtstudio.com/
Composers Page: Milesthatch.com
Teabone
Valued Member
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 6th Nov 2013 06:10 Edited at: 6th Nov 2013 06:57
Only a few that I know of, though I'm sure your probably already aware of them:

$EH - Entity Health
$EA - Entity Ammo

also I'm not sure by putting anything in the windowed properties of entity changes the actual FPE settings. Just that one entity on the map. Since every new entity of the same entity you place won't have those new values in them , that the other ones does.

(Teabone)
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 6th Nov 2013 07:53 Edited at: 6th Nov 2013 07:59
Exactly so the idea is that for some repetitive scripts that require engaging several separate entities, we could make a universal script (for whatever function it is required) and then using those empty fields input custom information.

Essentially avoid having to make a new FPI file for every new entity that has to perform the same function.

You can in fact create a new property field in FPE file of an entity by simply typing it in a new line. It won't do anything, of course, since if it's not Hard Coded as a registered FPE function like "material" "collisionmode" or "scale" BUT it will appear none the less..

Just like if you want to use a value of the variable in an FPI function, you put a % sign before the function value place,
(AMBIENCE=%variableName) the &0 sign does seem to reference to the audio input field of the entity (sound=&0).

Question is can you fetch the newly created fields?

Isenstadt Studio: http://isenstadtstudio.com/
Composers Page: Milesthatch.com
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Nov 2013 16:59 Edited at: 6th Nov 2013 16:59
Quote: "My question is - can you make the FPI script fetch other input fields of the entity property? New fields can be created in the FPE of the entity."


No. The script will only "fetch" fields that are defined in the source. Items such as "stopsound=$0", "sound=$0", "plrsound=$0", etc utilize this to tell the script to find the path and sound file from the item defined in the property of the entity. It also saves time having to type out the path to where the sound is you want to play. The "$0" and "$1" of course are the two fileds you can define.

The other items Teabone mentioned are from variables, which again are hard-coded into the source. Other than what is defined in the source, you cannot just "pull" info from an entity property into a script.


There's no problem that can't be solved without applying a little scripting.
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 6th Nov 2013 17:26
That's unfortunate

Isenstadt Studio: http://isenstadtstudio.com/
Composers Page: Milesthatch.com

Login to post a reply

Server time is: 2024-04-20 08:53:53
Your offset time is: 2024-04-20 08:53:53