Question: lua

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
User avatar
tjhkkr
Posts: 2430
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

Question: lua

Post by tjhkkr »

Is there a lua command to add victory points to a side?
If not, is there a property I can interrogate and add points with?

Thank you!
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
Tomcat84
Posts: 1952
Joined: Wed Jul 10, 2013 5:13 pm

RE: Question: lua

Post by Tomcat84 »

Well you have the "points" action in the event editor.

If that doesn't work and you want to somehow Lua activate that maybe you could make a repeatable event that has an action of adding 1 point (or however many you want) and is triggered by a "jeep" or some unit on a non player side entering an RP defined area in Siberia or somewhere away from the action.

Then whenever you want Lua to add a point you use Lua to add that exact type of mobile unit at a coordinate just outside the area, and assign it to a mission to move into the RP marked area.

Does that make sense? Never tried it, just what I could think of right now
My Scenarios and Tutorials for Command

(Scenarios focus on air-warfare :) )
User avatar
tjhkkr
Posts: 2430
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

RE: Question: lua

Post by tjhkkr »

Thank you; good idea.
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
User avatar
tjhkkr
Posts: 2430
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

RE: Question: lua: Random number of victory points.

Post by tjhkkr »

Okay I found the answer with the stuff the Developers provided...

NNNN = the maximum number of points possible...
The Developers really gave us some great tools to use with LUA...
====
newScore = ScenEdit_GetScore (side)
r = math.random(1, NNN)
newScore = NewScore + r
ScenEdit_SetScore (side, newScore)
====
Now, if I can only figure out how many points to award for surviving uptown Kate (as opposed to Kate Upton).
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
Post Reply

Return to “Mods and Scenarios”