[H4] newbie map editor help

Maps and the art of mapmaking.
User avatar
bibo
Leprechaun
Leprechaun
Posts: 4
Joined: 27 Feb 2009
Location: Amsterdam, the Netherlands

[H4] newbie map editor help

Unread postby bibo » 28 Feb 2009, 18:11

i'm making a map on H4, and i can't figure out 1 thing in the scripting, I want to make a single placed event that destroys multiple houses, so I made this:
ASK QUESTION:

question: do you want to destroy this village?

if YES: fight 150 peasants, if victorious, delete adventure objects with marker "house1"

if NO: do nothing

and i placed a few bombs with markers "house1".
of course the event deleted the bombs, not the houses they were placed on. :disagree:

now how do i trigger the bombs instead of deleting them? 8|

EDIT: i tried cutting out the peasants and just destroying the objects, same thing happened.
Last edited by bibo on 03 Mar 2009, 20:46, edited 1 time in total.

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

Unread postby wimfrits » 01 Mar 2009, 19:24

The "delete adventure objects" and the bomb setup should be fine.

I think the problem is with the victorious option, but I forgot what the issue was. Either the victorious and defeated brances be turned around (i.e. the 150 peasants are defeated) or the scripts didn't work at all.
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 » 02 Mar 2009, 09:47

There was something odd about them. I believe that wimfrits was right; the defeated and victorious were switched so you could also check if it'll work if you switch the events around. But the thing was that there is a better way to check if a army was defeated (and had not just fled) like thus:


Sequence
-Give 1 Ghost to This Army
-Take 1 Ghost to This Army
-Conditional Event
--If
Number of Ghosts in This Army > 1
--Then
This Army was defeated (if the player had fled this option will not be chosen)
--Else
This Army is still out there somewhere so you'd have to check whether they actually beat the peasants or had just fled


So I hope I helped...
Grah!

User avatar
bibo
Leprechaun
Leprechaun
Posts: 4
Joined: 27 Feb 2009
Location: Amsterdam, the Netherlands

Unread postby bibo » 03 Mar 2009, 16:39

I switched it around, still nothing happens. 8|
and thelonious, I just use the victory cheat to test it, so they didnt flee.

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

Unread postby Thelonious » 06 Mar 2009, 22:32

Have you tried making some text appear under victorious and defeated? Then you know exactly what triggers...

I haven't worked with the editor for some time but a quick search into it made me think:
perhaps you could look at your script and make sure the marker and script have the same name; I make that mistake all the time. The fastet way to check is to give the bomb a name (in your case house1) then go to the script and select that name from the list.
The perculiar thing is that for placed events the golden ball/sausage gives a list of all the placed events scripted in the map properties. (just the other way around)

But then I figured that's the first thing one checks... Have you tried making other bombs and blowing stuff up? If this works then it must be the script...
Grah!

User avatar
bibo
Leprechaun
Leprechaun
Posts: 4
Joined: 27 Feb 2009
Location: Amsterdam, the Netherlands

Unread postby bibo » 07 Mar 2009, 13:24

I tested it out in another map, and there it just works fine! 8|
dunno whats wrong... :|
EDIT: nvm, it works now(dont know why, but it does)
this thread can be locked/removed/etc.
What? yes.

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

Unread postby Thelonious » 09 Mar 2009, 11:06

Aaah the perils of map making... it's always a joy to find something working after a while...
Grah!


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 4 guests