problem with RemoveObject

Maps and the art of mapmaking.
myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

problem with RemoveObject

Unread postby myythryyn » 24 Nov 2006, 01:52

ok so i have an underground cavern that is blocked by a stalactite, or stologmite, whichever, and at some point this block is supposed to be removed and the player can go past it.

so i used the RemoveObject command, which works fine, the object dissapears off the map, but the game didnt reset the pathing, and the passage is still blocked, even though the rock is gone.

anyone have luck getting this command to work?

User avatar
Vitirr
Scout
Scout
Posts: 157
Joined: 06 Jan 2006
Contact:

Unread postby Vitirr » 24 Nov 2006, 02:01

I have used RemoveObject with heroes, and it works just fine. Are you sure you aren't blocking the entrance with any other thing? Is the entrance a normal subterranean gate or have you made any custom object for it?

Najibarr
Leprechaun
Leprechaun
Posts: 21
Joined: 22 Oct 2006

Unread postby Najibarr » 24 Nov 2006, 02:03

I guess what could work is to remove the blocked tiles from the object and replace them with a blocked region which you unblock at the same time than you remove the object.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 24 Nov 2006, 03:14

i did try taking the object off the map, and then running the map. and the pathway was clear. so it definetly is a problem with the game recalculating pathing after removing object with script.

hmmm, so you think if i make a blocked region the size of the rock, then at the same time that the script removes the object, it also unblock the region the that might work? ill try that now and see what happens.

edit - nope i used these commands and area is still blocked.

RemoveObject ("rock");
SetRegionBlocked( "block", off, PLAYER_1);

so i dunno. i suppose the rock isnt needed to be there, its just decoration, but i wouldnt mind knowing how to use the removeobject script.

User avatar
Vitirr
Scout
Scout
Posts: 157
Joined: 06 Jan 2006
Contact:

Unread postby Vitirr » 24 Nov 2006, 09:51

Shouldn't it be SetRegionBlocked( "block", false, PLAYER_1); ?

Anyway, for that to work, as Najibarr said, you should edit the object and remove the blocked tiles from it, (so that it's completely passable).

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 24 Nov 2006, 11:46

What I did on Ruins in desert was to place the movable objects to a hidden remote place first. Block the to-be-passages with Regionpassability command and move the objects to their position on day 1. In other words each object is moved twice. First, at the start of the map to its correct position, and when the player does the right thing the moved "mirage" image is deleted. The actual passability is determined only by regions and the objects own unpassable tiles are on a remote location, where they do not disturb anything.
Avatar image credit: N Lüdimois

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 24 Nov 2006, 14:45

Pitsu wrote:What I did on Ruins in desert was to place the movable objects to a hidden remote place first. Block the to-be-passages with Regionpassability command and move the objects to their position on day 1. In other words each object is moved twice. First, at the start of the map to its correct position, and when the player does the right thing the moved "mirage" image is deleted. The actual passability is determined only by regions and the objects own unpassable tiles are on a remote location, where they do not disturb anything.
ok i was wondering how you did that on your map. i wouldnt have thought to do that.
so you had a problem with removed objects still blocking paths as well?
i guess the command is bugged.
what is interesting is that you can use remove object on a colored gate, and the pathing is recalculated, but not with normal objects.

reading over your script i see you used the SetObjectPosition command.

im going to try that right now, thxs pitsu :)

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 24 Nov 2006, 14:54

SetObjectPosition and RemoveObject do not change the passability for tiles that cannot be removed normally. Heroes, artifact etc that can move, be picked up or some such are fine. But as I said impassable objects block only the regions where they are placed originally, before the script is run. During the time of play a completely passable image of whatever object can jump around over the map with no problem.

BTW, on Fury of Elements didn't the script remove the necro town? IIRC the town area was completely passable after that (somewhat to my surprise).
Avatar image credit: N Lüdimois

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 24 Nov 2006, 15:54

i still think it doenst make sense that you can remove an object and its pathing is still blocked. otherwise whats the point of the removing the object?
im sure its not what nival intended, and im glad you figured out a workaround :)

well im glad i suprised you :) about fury of the elements that was my attempt at using the raze town command.
i also didnt expect the town to go poof off the map and totally dissapear, but since it did more or less what i wanted, i left it as it is. its too bad they dont have ruined town objects for all the faction towns.

User avatar
Vitirr
Scout
Scout
Posts: 157
Joined: 06 Jan 2006
Contact:

Unread postby Vitirr » 24 Nov 2006, 18:29

I agree it doesn't seem like it does what should do. It's probably a bug.

So the raze town script just make the town dissappear?

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 25 Nov 2006, 00:00

Vitirr wrote: So the raze town script just make the town dissappear?
i probably wasnt using it as your suppposed to, you have to edit the razed properties value in the sharedobjects menu for a town object.
its blank by default when you place a town.

so i placed the razetown dungeon object for the value, which im assuming is a blank object since the town dissapears. i havnt tried the other factions razetown values, im guessing the only one that would produce a razed town would be inferno, since there is a razed inferno town object in the editor.

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Unread postby meows » 30 Nov 2006, 12:35

I have a dumb question but I can't figure it out.. How in the world do you get anything but flat floors in the underground?

only size 3 works to lower or raise but it raises back to the top and I can't add to the top either.
Bulk has no effect. I have seen some very nice pathing in maps where there are ramps and even hills but I can't figure out how to do it.

Many thanks.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 01 Dec 2006, 00:02

hmm, well in every map ive made the bulk feature works underground, and i can make hills or rolling terrain underground

even more interesting you can use the dig feature to go even deeper in the earth and make interesting underground pits.

but you cant use the bulk in a square next to an underground wall.
it wont let you bulk there. in open space you can.


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 4 guests