|
Thread: Creating Adventure map objects | |
|
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.
____________
|
|
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?
|
|
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.
____________
|
|
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?
|
|
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.
____________
|
|
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 .
|
|
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.
____________
|
|
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.
|
|
Kronos1000
Promising
Supreme Hero
Fryslân 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")
____________
Hwær cwom mearg? Hwær cwom mago?
Hwær cwom maþþumgyfa? - 'The Wanderer'
|
|
Maurice
Hero of Order
Part of the furniture
|
posted November 03, 2007 11:49 AM |
|
|
That's a more clean method .
|
|
chro
Tavern Dweller
|
posted November 03, 2007 11:24 PM |
|
|
alright, thanks for the help
____________
|
|
|
|