Page 1 of 1

Activate/Desativate special action with point

Posted: Sun Sep 30, 2018 4:39 pm
by Norm49
I am trying to make a special action activate if a player have 100 point or less and i want the action to be repeatable because the special action cost point and i do not want the player to fall under 0 point. In this case the script had a dock DDG to a naval base.

So my script for the spacial action work fine and i was trying to use even to activate and deactivate the special action. So i have the trigger that activate if the player have over 99 points and the event action is a lua script witch should deactivate the even that prevent the player buying the destroyer.The trigger is the one we can chose in the trigger option and is not a lua script.

This is the action script

Code: Select all

ScenEdit_SetEvent ({DescriptionOrID ='DDG no longer available to buy', IsActive='False'})
 ScenEdit_SetSpecialAction ({ActionNameOrID ='Buy a Arleigh Burke DDG 100 VP', IsActive='True'})

and is have a event that activate when the player score fall under 100.

Code: Select all

ScenEdit_SetEvent ({DescriptionOrID ='DDG now avilabe to buy', IsActive='False'})
 ScenEdit_SetSpecialAction ({ActionNameOrID ='Buy a Arleigh Burke DDG 100 VP', IsActive='False'})

Also when i test this my game star lagging a lot and it is not because of the amount of unit I play bigger scenario with out problem.

RE: Activate/Desativate special action with point

Posted: Sun Sep 30, 2018 7:22 pm
by michaelm75au
Can you add the scenario? Bit hard to tell why it starts to lag on when the event is activated when the details aren't available.

RE: Activate/Desativate special action with point

Posted: Sun Sep 30, 2018 10:18 pm
by Norm49
I have special action to add and remove point for testing purpose. I still have tonne of other stuff the mission is in early development.