Scripts / FPE - Scripts - Entity Properties

Author
Message
Go Devils
12
Years of Service
User Offline
Joined: 13th Aug 2012
Location: Phoenix Arizona USA
Posted: 21st May 2014 19:08
Slowly but surely I'm making progress in understanding how to work with FPSR. What I'm trying to understand is the relationship between the FPE file, the Entity Properties, and the activation of scripts.



Questions



1) Is there a document or tutorial that provides all of the codes that can be structured into an FPE file?



2) Also, is there a document and tutorial that goes through the properties of an entity? I know that much of the FPE file ends up in the entity properties, but some appear to be default values. Just want to know how this works?



3) I've been looking at the LUA scripts and I think I'll be OK there once I understand the hooks and commands that are inside FPSR. What I'm foggy about is how the system works. For example the DOOR script to open the gate. It first calculates the distance between the player and the entity, and this determines if additional action is taken such as opening or closing the gate.



My question is; how and when is this script activated? Does the system activate the script during each play cycle? Is such "each cycle checking" limited to dynamic entities?



4) I'm assuming that the globals script is a depository for functions that can be used by multiple scripts (entities)? If I create such a function do I place it in the global script?



5) When an entity is referred to in a script it has an "e" as the variable that defines the entity (example g_Entity[e] ) Is the "e" a numeric value or a string? How is this number assigned?



Having spent some time with DB Pro I think I have a general understanding of what is going on in the background, but I want to fine tune this knowledge.



Thanks
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 21st May 2014 19:22
1. not sure but if not there should definitely be 1 added to the wiki if someone feels like making it



2. right now pretty much nothing works except the colt damage and the character(enemy) HP value (and pretty much everything in the player start marker)

they are being added (should be more working in 1.007) but mostly it's all placeholders.



3. all scripts run constantly unless the Destroy(e) command is used (static and dynamic doesnt matter)

(if the conditions arent met then naturally nothing will happen but it will still always check until destroyed).



4. yes but it's a good idea to make a seperate lua file and call it from the global (or the script that requires it maybe) as the global file will get overwritten each beta.



5. it's a number and you have no control over this value, avram has a way to call entities based on name but his code will need to be updated for 1.007 as it's been confirmed not working by lee https://bitbucket.org/Avram/fpsc-r-toolkit/wiki/Home



hope that helps some

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Login to post a reply

Server time is: 2024-12-22 01:18:47
Your offset time is: 2024-12-22 01:18:47