Posted: Thu Dec 20, 2012 11:37 pm Post subject:
Making fscripts
I was wondering if there are any tutorials about making fscripts for FinalAlert. Those (handy) tool scripts to extend the map by 50, or add 4 Apoc tank attack trigger.
I've looked into FlyingZ's work, and I assume he did not find everything out by himself. _________________
FinalAlert 2 -> Help -> Manual, listed under main table of contents is page '10. FinalAlert 2:YR User Scripts', which contains documentation of the script language used. That's really all you need or get.
It's kind of limited in the end, but still extremely useful tool for certain types of tasks. For example, I modified FlyingZ's waypoint grid script to apply rain/snow animations and sounds for any map I like. _________________ QUICK_EDIT
Just examine an already existing script that's somewhat similar to what you're trying to do and use it as a reference to create your own. _________________ QUICK_EDIT
You will need Final Alert 2, and the 01 add Storms and Fog.ini provided with MLEP.
Begin by openining your map in FA2 by selecting file, then open.
Now make sure you are not in beginner mode. "Check under options and make sure beginner mode is not checked."
Next go to edit then select INI editing. Now hit the Insert another INI file content.
Go ahead and select the 01 add Storms and Fog.ini provided with MLEP.
It will ask if you want it to overide previous settings, accept.
Finnaly you are done, save your map, it is now MLEP enabled!
With this method all you need do is make 1 master ini file, and then anyone can run that file for any of their maps to inject code into their map.
I never learned how to make an fscript but I can't imagine it being too different. _________________ Grab my Map Logic Expansion Pack 5.2 here!
Adds random weather patterns into maps.
More disabled navalyards.
Preplaced Neutral buildings.
Additional new features.
Well my guess is that the function 'Multi' only performs integer multiplications. Which means, that 0.69 is probably truncated to 0 and there we go. Out of luck with that one, I guess.
EDIT: Yep, this appears to be the case, considering 1.6 multiplied by 100 etc. result in 100 and so on. _________________ QUICK_EDIT
Can't I use "GetChar(Char,String, Pos);" for 0.69? So it would get 6 as pos3 and 9 as pos4 and then paste them together as '69'?
Is that possibru? _________________
Can't I use "GetChar(Char,String, Pos);" for 0.69? So it would get 6 as pos3 and 9 as pos4 and then paste them together as '69'?
Is that possibru?
That one takes a character as a parameter, so it only retrieves a specific character from a specific position in the string. Kind of prevents you from using it for that. Would've been lot more useful if it only required string & position, though. _________________ QUICK_EDIT
If you cancel a script, with a variable set, can you show a message first?
Like, something in the INI file is incorrect, show message with reason then cancel?
EDIT:
Can I also make the script continue if a variable is true? Similar like Cancel();, you can make it cancel if a variable is true. Can I create some sort of 'green light' check to see if something is correct, THEN it continues? This is so I can use multiple INI keys.
EDIT2:
Is there a way to cancel the script when it asks for an Integer, House, Trigger, Country etc... input? I have noticed you can spam the cancel button all you like, but it isn't cancelling. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum