Hello,
I’m experimenting with Forge. I want to make my map dynamic. For that reason, I want to let predefined things happen at random times. For this reason, I’m trying to figure out how, in scripting terms, to:
- Send a message after a random interval has occurred. For example, I want to say something like “sometime between 3 minutes and 5 minutes from now, send a message”. - Get a random number between a minimum value and a maximum value.If there isn’t a way to do this in the game today, I think it could be done like this:
-
Introduce a new object type: “Script Value”. It could be added right beside the “Script Brain”. The purpose of a “script value”, or whatever you want to call it, is to be a place that forgers can place values for the purpose of storage or retrieval. In programming terms, this basically serves as a variable. A new “General” Object property called “ID” would need to be added so that a script value can be referenced. Let people choose this ID, or just make it a sequential value for the sake of reference.
-
Create a new action called “Generate random value”. Here are the details:
Action: “Generate random value”
Type: [number | timer ]
Minimum Value: i.e. 1 or 1.10 (allow values to be set to tenth of a second intervals)
Maximum Value i.e. 1000 or 999.9 (allow values to be to to tenth of a second intervals)
Storage Location: name of “Script Value” object -
Add a new <Condition> to work with:
Condition: On Script Value Update
I believe this approach would give forgers a way to add a LOT of dynamics to their maps. At the same time, this approach doesn’t add much, if any complexity to forge. Just a way to enrich the building process.
Thanks