Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 5 - Modders Workshop > Thread: Creating Adventure map objects
Thread: Creating Adventure map objects
chro
chro

Tavern Dweller
posted November 01, 2007 11:50 PM

Creating Adventure map objects

Just need help with the syntax on creating a building on the adventure map.  Such as after you get to a seers hut and you want a two-way monolith to appear next to it. How would i go about doing this? i can get it all except spawning the monolith. I'm using CreateStatic and I'm pretty sure thats not right but don't know what else to use.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Daystar
Daystar


Honorable
Legendary Hero
Back from the Dead
posted November 01, 2007 11:59 PM

I have no idea, but is there a...teleport object that you can use?  And then put it somewhere inaccesible (underground) and teleport it over.
____________
How exactly is luck a skill?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
chro
chro

Tavern Dweller
posted November 02, 2007 06:14 AM

ah, what i mean is that i have

CreateStatic("Monolith Two Way", 115,202,222);

in my script to try to generate the monolith.  115,202 are the coords and 222 is the group its in. this hasn't worked and was wondering if anyone knew the correct syntax for it.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted November 02, 2007 09:23 AM

Quote:
ah, what i mean is that i have

CreateStatic("Monolith Two Way", 115,202,222);

in my script to try to generate the monolith.  115,202 are the coords and 222 is the group its in. this hasn't worked and was wondering if anyone knew the correct syntax for it.


The name isn't right. It's probably something like "BUILDING_MONOLITH_TWOWAY" or close to it. I don't have the .exe here at hand, so I can't check the exact name.

But before you try something like that, what is the exact error message that the game returns in the console when you try this?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
chro
chro

Tavern Dweller
posted November 02, 2007 08:20 PM

thats the main problem, when i launch the map it just doesn't work. no error message.  The code checker finds nothing and the only error is the other monolith that was up at the time and it yelled that it had no matching monolith.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted November 02, 2007 11:18 PM
Edited by Maurice at 23:20, 02 Nov 2007.

Ok, I dove into this one. You can't create a Monolith, since it's a building. Its name is "BUILDING_MONOLITH_TWO_WAY" ingame, outside the game you can find the data under /MapObjects/Monolith_Two_Way.(AdvMapBuildingShared).xdb.

The correct syntax for the CreateStatic command is

CreateStatic(A,B,X,Y,F);

where A is the name, B the reference, and X, Y and F the coordinates.

so for example as follows:

CreateStatic("Will_o_wisp","/MapObjects/Dirt/Misc/Will_o_the_wisp.(AdvMapStaticShared).xdb#xpointer(/AdvMapStaticShared)",X,Y,Floor);

This will create a STATIC object (i.e. a non-interactive map object, like a tree, a rock, etc ...) on location (X, Y) on level Floor (0 = surface, 1 = dungeon). In this example I've chosen the will-o-wisp static, and named it as such, but the name is free to choose; it is only used by the script to identify the static once it's been created. The second argument is the most important: it points to the static you wish to place on the map, within the data.pak file; in this case: "/MapObjects/Dirt/Misc/Will_o_the_wisp.(AdvMapStaticShared).xdb#xpointer(/AdvMapStaticShared)".

Two things: you cannot execute this command in a simple manner from the console, because it is much longer than the maximum of characters allowed on a single line there; you can only use it in scripts. Secondly, I just performed a directory search on the word "static" inside the MapObjects directory of the data.pak file and it returned a grand total of 1063 files. Plenty of statics to generate .

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
chro
chro

Tavern Dweller
posted November 03, 2007 12:19 AM

alright, thanks. but the outcome is that i can't create a monolith. humm , are there any work arounds that are possible? id like to have it spawn a monolith after a certain amount of time, but keep it a two way. basically just give access to another region of the map.  I know i can't be the first one to want something like this.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted November 03, 2007 10:54 AM
Edited by Maurice at 10:56, 03 Nov 2007.

The "SetObjectPosition" command only works for mobile objects (i.e. Heroes, creatures, etc ...). It doesn't work for stationary objects like Monoliths.

Now there is a command "MakeTownMovable", which is used in the Academy campaign of TotE, to make Zehir's town transportable. Perhaps you could try and change some of the Monolith's statistics to make it appear a Town and use this command. However, that might require some modding and could also destroy the very Monolith function to begin with.

Edit: You can do it another way, by the way. Just use static objects (like rocks or trees) to block the Monolith you don't want to have available yet. Eventually when you feel the time is right, remove those static objects so the portal becomes accesible.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Kronos1000
Kronos1000


Promising
Supreme Hero
Frysln Boppe
posted November 03, 2007 11:18 AM

There is yet another way. Look at this example.

Seer = 0
SetObjectEnabled("Monolith", false)

while Seer == 0 do
sleep(5)
if GetObjectiveState("SeerHutObjective", PLAYER_1) == OBJECTIVE_ACTIVE then
SetObjectEnabled("Monolith", true)
Seer = 1
end;
end;

This will make the Monolith unactive untill you accept the Seer's Hut Quest if you touch it nothing happnes, you can make a MessageBox trigger sayng you can't use this Monolith.

function MonolithMessage(heroname, objectname)
if GetObjectEnabled("Monolith") == false then
MessageBox("Whatever")
end;
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Monolith", "MonolithMessage")
____________
Hwr cwom mearg? Hwr cwom mago?
Hwr cwom maumgyfa? - 'The Wanderer'

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted November 03, 2007 11:49 AM

That's a more clean method .

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
chro
chro

Tavern Dweller
posted November 03, 2007 11:24 PM

alright, thanks for the help
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll Post New Topic Post New Reply

Page compiled in 0.0227 seconds