Reverie World Studios Forums

Reverie World Studios Forums (
-   Main Square (
-   -   Unit upgrades? (

OrcSlayer 04-25-2009 06:42 AM

Unit upgrades?
If u have an archer can u upgrade him into a crossbowman or longbowman and the same with other units like swordsman to two-handers or spearman to pikes

Mrdash 04-25-2009 02:30 PM

Dude you seriously need to search for these answers. This has been talked about already.

Go to "Search" and type in the subject you want to know about. If its been talked about (Which most things have) It will come up.

Andy Joslin 04-25-2009 03:18 PM

No. Easily doable with a bit of scripting in your own scenario or unit, though. :)



var Button = Self:AddActioner("ToCrossbow")
Button.Details = "Upgrade to Crossbowman"
Button.ExtendedDetails = "200 Experience required."
Button.Icon = "Icons/crossbowman"
Button.Func=function (Self,MButton)
if Self.Experience>=200 then
  var Crossbow=Self:NewObjectRelative({0,0,0},0,0,0,0,"Men-Units-Crossbowman")
elseif Self.Experience<200 then
  NotifyPlayer(200-Self.Experience.." experience required to upgrade to crossbow")

It's that easy! I just typed that up in a few minutes. The "Button.Func" runs when the button is pressed. You could have anything in the button's function.

This is but an example of how easy it will be for users to drastically change the game with a small bit of editing.

TaTa456 04-25-2009 06:36 PM

sorry sir im sure its easy for you because its what you do, but i see that and i look like this dood :eek: then after that i look like :confused:

Mrdash 04-25-2009 07:07 PM

Thats exactly what I was thinking. But as long as the tutorial explains all I need I'll be good.

Puppeteer 04-26-2009 06:15 AM

I understand it, it's just a case of being able to come up with those kind of codes which will be difficult. Maybe experience with some .ini has helped :p

raving 04-26-2009 08:29 AM

i understand most of it, but dont expect me to find that on my own :D

Joseph Visscher 04-28-2009 03:15 PM

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!" :D

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.

LiTos456 04-28-2009 05:44 PM

Wow, nice script. So easy a caveman can do it.

TaTa456 04-29-2009 11:25 AM

...:eek: ...:confused: ...:( guess im screwed and should go back to my cave:mad:

All times are GMT -6. The time now is 10:05 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
Copyright 2001-2011 Reverie World Studios INC. All Rights Reserved.