Numeric Valuables problem

Maps and the art of mapmaking.
User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Numeric Valuables problem

Unread postby Orfinn » 06 Feb 2006, 20:04

Yeah, for the first time ever, I tried to make a quest hut quest. Find some trolls, kill them then return to the quest hut.
I did everything said in the help about it. But when I try to close the windows it says " A variable name must consist of one or more alphanumeric or underscore character" I cant close the window thanks to this message and what does this message mean?

User avatar
Robenhagen
Admin
Admin
Posts: 1247
Joined: 21 Nov 2005
Location: Aarhus, Denmark
Contact:

Unread postby Robenhagen » 06 Feb 2006, 20:48

It means you haven't entered a name for you numeric variable.

User avatar
ScarlettP
Round Table Knight
Round Table Knight
Posts: 2391
Joined: 06 Jan 2006

Unread postby ScarlettP » 06 Feb 2006, 23:44

You can call it "Troll" if you want. Anything will do, it just has to have a name with no spaces.

User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Unread postby Orfinn » 07 Feb 2006, 10:32

With no spaces? Oh, well then I understand. But weird enough in the Help tips the example was named "Killed the Wolves" which have two spaces, maybe it was just an error or a misleading hint ;|

But thanks for the help, now I gonna make that quest complete or I'll never be able to deliver the troll toenails the dwarven hermit wanted me to get :D :-D

User avatar
theLuckyDragon
Round Table Knight
Round Table Knight
Posts: 4883
Joined: 06 Jan 2006

Unread postby theLuckyDragon » 07 Feb 2006, 10:45

Should we expect a new map anytime soon?...
"Not all those who wander are lost." -- JRRT

User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Unread postby Orfinn » 07 Feb 2006, 11:15

theLuckyDragon wrote:Should we expect a new map anytime soon?...
Maybe, im just fixing up a map named River.... and something(forgot the original name) named it to River War. Red, Blue and Green fights each other.
Gonna make my own map soon. It will be medium or large with lots of placed events and such, big woods dark and normal, spooky stuff and lots of it ;)

User avatar
ScarlettP
Round Table Knight
Round Table Knight
Posts: 2391
Joined: 06 Jan 2006

Unread postby ScarlettP » 07 Feb 2006, 13:51

Heck, I can't remember WHERE you can use spaces and WHERE you can't. When I'm working on them, I use spaces and if it refuses the name, I take the spaces out. End of problem.

User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Unread postby Orfinn » 07 Feb 2006, 15:09

I'll try it out ;)

*testing*..........yes it finally works! Thanks again for helping me out!

Oh and the name on the map was River Crossing.
Last edited by Orfinn on 07 Feb 2006, 15:21, edited 1 time in total.

User avatar
Thelonious
Round Table Knight
Round Table Knight
Posts: 1336
Joined: 06 Jan 2006
Location: right behind the next one

Unread postby Thelonious » 07 Feb 2006, 15:14

ScarlettP wrote:Heck, I can't remember WHERE you can use spaces and WHERE you can't. When I'm working on them, I use spaces and if it refuses the name, I take the spaces out. End of problem.
Underscores ( _ ) will work fine as well...
Grah!

User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Unread postby Orfinn » 07 Feb 2006, 19:15

BTW On regular gold ball events, how do I prevent them for being triggered again in-game? I had a troll under the bridge event, after passing it the first time and killed the trolls with my first hero, they popped up again when I passed the event spot with another, well it dosent matter which hero, just that every tiome I try to pass the bridge I must kill them again.

User avatar
Thelonious
Round Table Knight
Round Table Knight
Posts: 1336
Joined: 06 Jan 2006
Location: right behind the next one

Unread postby Thelonious » 07 Feb 2006, 19:51

Use a 'remove script' at the end of your script. It only works once then.
Grah!

User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Unread postby Orfinn » 07 Feb 2006, 20:03

Thelonious wrote:Use a 'remove script' at the end of your script. It only works once then.
dosent work on placed events, well it pops up but then the other stuff disapper like gettin the reward etc.

User avatar
Thelonious
Round Table Knight
Round Table Knight
Posts: 1336
Joined: 06 Jan 2006
Location: right behind the next one

Unread postby Thelonious » 08 Feb 2006, 13:55

Huh, where'd ya put it - it has to be at the end of all thing to do in the script

Example:

Display Text
Give Artifacts
Give Experiance
Remove Script

And nothing after that - because the script will allready be removed and any action after 'remove script' won't be executed.
Grah!

User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Unread postby Orfinn » 08 Feb 2006, 15:04

Thelonious wrote:Huh, where'd ya put it - it has to be at the end of all thing to do in the script

Example:

Display Text
Give Artifacts
Give Experiance
Remove Script

And nothing after that - because the script will allready be removed and any action after 'remove script' won't be executed.
Ok heres the deal.

1: I go to map properties, select events and edit.

2: I chose to create a Placed event, in this case surprise after the bridge.

3: In General I write the same as above "surprise after the bridge"

2: In the effects tab under message I wrote: "You thought that you left the bridge unnoticed? Well, you thought wrong!"

4: Then under the script tab I chose Combat, this army, opponents 30 trolls with 1 artifact (emerald longbow).

5: Then I go to branches If victorious: Give Emerald Longbow to This Army, if Defeated: Do nothing.

6: Then I place a gold ball on the map after a bridge and select "surprise after the bridge.

7: I played the map and every time a hero goes over the bridge, I have to fight the trolls but they should only appear ONCE. Try to do the same as me, I dont know what to do.

User avatar
Crusard
Equilibris Team
Equilibris Team
Posts: 218
Joined: 06 Jan 2006
Location: Buenos Aires, Argentina
Contact:

Unread postby Crusard » 08 Feb 2006, 15:56

Yes, scripts will be read infinite times until you tell them not to do so, they're powerful, but they can't read your mind!
To prevent this event from being fired again there's two main things to do.

1) After the Combat command use a "Remove this object" command. That way, the "Golden Ball" as you name it (Which is the 1x1 Event object) will be removed once this command is read (after the combat command).

2) Instead of that command, you can use "Remove this script". That way, any placed event named "surprise after the bridge" won't work anymore, because the script has been deleted from the map (for this match, at least :P).

Hope you understood the difference, but both should work in this case. Just remember commands are read in order from the top to the bottom.

ps: An advanced Third option for this, would be to use the famous Bombs, using a "Delete adventure object" command, linked to a bomb. When the selected bomb "explodes" it removes anything it touches in it's grid position.

User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Unread postby Orfinn » 08 Feb 2006, 16:05

Crusard wrote:Yes, scripts will be read infinite times until you tell them not to do so, they're powerful, but they can't read your mind!
To prevent this event from being fired again there's two main things to do.

1) After the Combat command use a "Remove this object" command. That way, the "Golden Ball" as you name it (Which is the 1x1 Event object) will be removed once this command is read (after the combat command).

2) Instead of that command, you can use "Remove this script". That way, any placed event named "surprise after the bridge" won't work anymore, because the script has been deleted from the map (for this match, at least :P).

Hope you understood the difference, but both should work in this case. Just remember commands are read in order from the top to the bottom.

ps: An advanced Third option for this, would be to use the famous Bombs, using a "Delete adventure object" command, linked to a bomb. When the selected bomb "explodes" it removes anything it touches in it's grid position.
I cant use more than one command at a time, if I add the combat command then select remove this objet the combat script window disappears an is replaced with the new one.
And if I use a bomb are there anything I must write to make it work?
If I try to make display a message then folloed by combat, well i cant its not on the list :grumpy:

User avatar
Humakt
Swordsman
Swordsman
Posts: 582
Joined: 06 Jan 2006

Unread postby Humakt » 20 Feb 2006, 12:48

Crusard wrote: I cant use more than one command at a time, if I add the combat command then select remove this objet the combat script window disappears an is replaced with the new one.
And if I use a bomb are there anything I must write to make it work?
If I try to make display a message then folloed by combat, well i cant its not on the list :grumpy:
1. Sequence allows you to do more than one thing.
2. Just name the bomb and then use event to detonate it.

User avatar
wimfrits
Round Table Knight
Round Table Knight
Posts: 2047
Joined: 06 Jan 2006
Location: Utrecht, the Netherlands

Unread postby wimfrits » 20 Feb 2006, 13:33

Indeed, use sequence in the actions tab to put multiple actions in a row.

And a little tip: as a standard, 'remove script' should always be the last action of a script.
Are you suggesting coconuts migrate?

User avatar
Thelonious
Round Table Knight
Round Table Knight
Posts: 1336
Joined: 06 Jan 2006
Location: right behind the next one

Unread postby Thelonious » 20 Feb 2006, 15:06

Crusard wrote:"Remove this object" command
That's the other way of removing a placed event, the simple one is your option number 2.
Grah!

User avatar
Orfinn
Round Table Hero
Round Table Hero
Posts: 3325
Joined: 06 Jan 2006
Location: Norway

Unread postby Orfinn » 20 Feb 2006, 16:34

Ok, heres my problemo under Placed Event Properties.

I create a placed event, naming it "Friendly Garganuans"
In the Effects tab I write "A couple of gargantuans appear from the small forest. They seem friendly, they also try to talk to you."

Then at the script tab I chose Display Message and the message reads
"Grofl" Maybe you need some help on your adventure?
Yes that would be kind of you!
"Snarl" Fine, lets go!

The subaction is that you will be given 3 gargantuans, then I press the New button at the bottom, and try to find the popular sequence and remove option but they arent listed! STUCK, Finito! The help guide in the editor is useless thanks to some misguidance I have found. And I tried this kind of thing with all other types of events, like triggerable, continious, but no it dosent get up on the list! First a message, then a new action (sequence) like combat then remove object/script, arrgh its frustrating :wall:


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 7 guests