coding

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Bball_24
Posts: 23
Joined: January 26th, 2006, 11:26 pm
Location: on my computer, at school, and asleep

coding

Post by Bball_24 »

Is there a way to code a level up? As in to make it just level up without the necessary exp points?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Nope.
romnajin
Posts: 1067
Joined: February 26th, 2005, 7:26 pm
Contact:

Post by romnajin »

You can just do that with WML, you don't need to code it.
Sorry for the meaningless post
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

romnajin wrote:You can just do that with WML, you don't need to code it.
You can't trigger a level-up with WML. What you can do is simply change the unit's type to another one, but in this case the player can't have a choice between level-up options and you must also know the unit's current type beforehand so you know what unit type to change into. For most campaign uses I can think of this is probably enough, however. So yes, what the original poster wanted to do is very likely possible.
Bball_24
Posts: 23
Joined: January 26th, 2006, 11:26 pm
Location: on my computer, at school, and asleep

Post by Bball_24 »

zookeeper wrote:
romnajin wrote:You can just do that with WML, you don't need to code it.
You can't trigger a level-up with WML. What you can do is simply change the unit's type to another one, but in this case the player can't have a choice between level-up options and you must also know the unit's current type beforehand so you know what unit type to change into. For most campaign uses I can think of this is probably enough, however. So yes, what the original poster wanted to do is very likely possible.
Iwant to give the person playing the campaign of the type of unit he is. (Possible choices: Swordsman, Archer, Horseman, Mage.)
Romnajin: yes, I mean WML.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Bball_24 wrote:Iwant to give the person playing the campaign of the type of unit he is. (Possible choices: Swordsman, Archer, Horseman, Mage.)
I'm not sure if I understand what that sentence is supposed to mean, or what you want to do exactly.
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

It is possible to display a menu.

It is possible to change a unit type.

So, maybe using this together you can do something similar to what you want to do...


See "scenarios\Heir_To_The_Throne\Bay_of_Pearls.cfg" for example of a menu (tags [option] and [command]).
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

Here's a bit of code from one of my scenarios, where you choose your hero, and the keep is on 37,2. Ignore the "begin with gold" bits. Unit-description is the name of the guy....

You might need to tweak it (alot maybe) to get this working... So I suggest you use this as example, not template.

Code: Select all

[event]
name=start
first_time_only=no
[filter]
side=1
[/filter]
[message]
speaker=narrator
message=_ "What kind of Hero are you?"
[option]
message=_ "Commander (begins with 100 gold)"
[command]
[unit]
type=Commander
description=Player1
x=37
y=2
side=1
user_description=Hero
upkeep=full
moves=1
[/unit]
[/command]
[/option]
[option]
message=_ "Longbowman (begins with 130 gold)"
[command]
[unit]
type=Longbowman
description=Player1
x=37
y=2
side=1
user_description=Hero
upkeep=full
moves=1
[/unit]
[/command]
[/option]
[option]
message=_ "Red Mage (begins with 50 gold)"
[command]
[unit]
type=Red Mage
description=Player1
x=37
y=2
side=1
user_description=Hero
upkeep=full
moves=1
[/unit]
[/command]
[/option]
[option]
message=_ "White Mage (begins with no gold)"
[command]
[unit]
type=White Mage
description=Player1
x=37
y=2
side=1
user_description=Hero
upkeep=full
moves=1
[/unit]
[/command]
[/option]
[option]
message=_ "Swordsman (begins with 100 gold)"
[command]
[unit]
type=Swordsman
description=Player1
x=37
y=2
side=1
user_description=Hero
upkeep=full
moves=1
[/unit]
[/command]
[/option]
[option]
message=_ "Pikeman (begins with 110 gold)"
[command]
[unit]
type=Pikeman
description=Player1
x=37
y=2
side=1
user_description=Hero
upkeep=full
moves=1
[/unit]
[/command]
[/option]
[/message]
[/event]

Why did the fish laugh? Because the sea weed.
Post Reply