OpenXcom Forum
OpenXcom Forks => OXCE Support => OpenXcom Extended (OXCE) => OXCE Support Y-scripts => Topic started by: vadracas on May 15, 2020, 10:10:16 pm
-
I'm attempting to write a script to create more varied enemies-
First problem: I attempted to make it so that only enemies would get the tags but have no idea if that part of the script is functioning.
Second problem: tags aren't being applied to any enemy ever.
Attaching the mod-please provide any critical feedback you have.
-
Sorry to say, but your script is 100% gibberish.
Can't really give any kind of feedback on that.
-
ok... I was literally reading from the scripting page on UFOpaedia and the API, so idk.
-
Here's a little something for inspiration: https://openxcom.org/forum/index.php/topic,7197.msg116928.html#msg116928
-
In the 40k mod we use a script to set random appearances for a certain type of enemy unit - you can check in our script files for the createUnit scripts for inspiration.
-
Thank you both!
So if I were to do what's outlined in your example, Meridian, would I have to copy/paste the script for every armor in every mod that I would want to use this with, or is there a way to make it apply automatically to all armors through a refnode or something?
-
Check how scripts are used in 40k, XCF, or Piratez - you can define a new tag to put on armors or items you want to interact with scripts.
-
So if I were to do what's outlined in your example, Meridian, would I have to copy/paste the script for every armor in every mod that I would want to use this with, or is there a way to make it apply automatically to all armors through a refnode or something?
My example was just a "local" script.
You can easily make a "global" script ... like you tried in your example... which applies to all (or tagged) armors.
Just study some existing scripts first, to get a feeling for it.