Nexus Modding > Scripting
Scripting Issues
Arparso:
--- Quote from: Mularac ---Probably not, unless you assign a GetSceneObj to those ship.
--- End quote ---
GetSceneObj doesn't really interfere with events - it's just a way to store an object reference in a variable, so you can use that object much more easily in your scripts without having to Select it every time. The problem simply is the game not triggering any event when you create a new ship using CreateShip, so the ShieldPreserve machine has no way of knowing about the arrival of the new ship.
--- Quote from: Mularac ---and a question, wouldn't that overide a previous and general ShieldIntegrity command issued to the ships with a given value? (like the one on SG:WB)
--- End quote ---
I don't quite understand, what you mean. Basically this won't override anything else, but different scripts might conflict with each other on some rare occasions. For example you might have a script automatically activating all inactive shields and another script automatically deactivating all active shields... of course, it's a stupid example, but obviously both these scripts won't work as expected when they are run at the same time.
I'm not really familiar with the Stargate shield script... could you elaborate?
Mularac:
it's real simple, here's the code (well... a part of it):
--- Code: --- State chargeshields
Rule event in
name "shield up"
:action
Debug("shieldup");
SelectShips(shieldup, 1);
ExecList(shieldup, S.this:shieldIntegrity:=4500000;);
Delay(0,1,Disable("shield up"),0);
:end
END
Rule event Longrangearrived
:action
E.ship:shieldIntegrity:=4500000;
makefullyknown(e.ship);
:end
END
--- End code ---
It basically charges the shields of a ship at the start of a fight or when the ship jumps in.
Mularac:
you sonova... it actually worked! from where the hell did you get that knowledge of nexus scripting system?!
Arparso:
Uhm... magic? :P
I guess me currently studying computer science might have something to do with that. But its mostly learning-by-doing while creating my first missions, the Skirmisher or investigating questions from the forum, etc.
Mularac:
you're studying computer science... what are the odds... me too :P
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version