Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > Civ5 - SDK / LUA

Notices

Reply
 
Thread Tools
Old Nov 09, 2010, 05:15 AM   #1
Nefliqus
Prince
 
Nefliqus's Avatar
 
Join Date: Sep 2010
Location: Poland
Posts: 386
How to add game event in MapScript?

Do you think that it is possible to add game event in Map Script?
I have add this code in map script:

function realstart()
print("Realstart ()");
local player = Players[0];
player:SetGold(555);
print("Really really just started a game! gold:",player:GetGold());
end

Events.SequenceGameInitComplete.Add ( realstart() );


but result is

Map Script: Realstart ()
Map Script: Really really just started a game! gold: 555

so it is executed before game init and gold in game is reset to 0.

how to change game parameters from map script level?

Last edited by Nefliqus; Nov 09, 2010 at 05:18 AM.
Nefliqus is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > Civ5 - SDK / LUA > How to add game event in MapScript?

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Advertisement

All times are GMT -6. The time now is 12:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR