Username:    Password:    Remember Me?         

Reverie World Studios Forums - View Single Post - Unit upgrades?
Thread: Unit upgrades?
View Single Post
  #8  
Old 04-28-2009, 03:15 PM
Joseph Visscher's Avatar
Joseph Visscher Joseph Visscher is offline
Reverie World Studios - Lead Level Designer, Senior Gameplay Programmer, 3D Animator, 3D-2D Artist.
 
Join Date: May 2007
Location: Canada B.C.
Posts: 1,279
Joseph Visscher has extremely good reputationJoseph Visscher has extremely good reputationJoseph Visscher has extremely good reputationJoseph Visscher has extremely good reputation
Default

LUA is quite easy and limitless when you get used to it, and we will have lots of reference for you and yea we do have a index for everything and such, might be confusing for the young people but its quite a basic language. They even refer some other easy languages with a quota of "Its as easy as LUA!"


if Self.Experience>=200 then -- if your unit has over 200 xp then this section runs
var Crossbow=Self:NewObjectRelative({0,0,0},0,0,0,0,"-Men-Units-Crossbowman") -- spawns a crossbowman on the same location and rotation of the parent unit that has the button
ReplaceSelectedUnit(Self,Crossbow) -- selects the old parent unit AND the new crossbowman.
Self:Remove() -- removes the parent unit that had the button. ( and unselects it)

elseif Self.Experience<200 then -- if your unit does not have over 200 xp then this section runs
NotifyPlayer(200-Self.Experience.." experience required to upgrade to crossbow") -- displays message saying you do not have enough and how much you need.
end -- ends the function.
__________________
Joseph B. Visscher - JBV3737

Bugs aren't the problem, figuring out how to fix them is.
Reply With Quote