H5 RemoveObject() function

Maps and the art of mapmaking.
Sarvi
Leprechaun
Leprechaun
Posts: 46
Joined: 29 Sep 2006

H5 RemoveObject() function

Unread postby Sarvi » 29 Oct 2008, 10:55

I'm having trouble getting this function to work!
I've read everything in this forum about it. I've studied maps where it is done (e.g. The Virgin of Ponce 3 - I tried removing the same brick object used there:- in my map it didn't budge!). But the command won't work for me!
I've also tried SetObjectPosition(), but that doesn't work either...
I've tried moving or removing different objects. I can move heroes and monsters, but nothing else.
The write-up mentions that "only movable objects can be moved", but cleverly doesn't say which objects are "movable".
I've noticed that RemoveObject() in other maps is used when you can't actually see the object in view. Is this a criterion?
Its frustrating!
Sarvi :(
Ach wie schoen das niemand weiss....

User avatar
Asheera
Round Table Knight
Round Table Knight
Posts: 4506
Joined: 06 Jul 2008
Location: The Shadows
Contact:

Unread postby Asheera » 29 Oct 2008, 11:31

What objects are you trying to remove?

For instance, SetObjectPosition and SetObjectRotation don't work for towns, unless you first call MakeTownMovable.
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.

Sarvi
Leprechaun
Leprechaun
Posts: 46
Joined: 29 Sep 2006

moving objects

Unread postby Sarvi » 30 Oct 2008, 06:13

Asheera wrote:What objects are you trying to remove?

For instance, SetObjectPosition and SetObjectRotation don't work for towns, unless you first call MakeTownMovable.
Im trying to move or remove simple non-interactive objects like a rock. Also tried the same objects removed by rdeford in "Virgin of Ponce" (big_brick) with the same command he used, but it doesn't work for me...

I've tried the RemoveObject() command in a function triggered by REGION_ENTER_etc or by OBJECT_TOUCH_etc but neither case works.
Ach wie schoen das niemand weiss....

User avatar
Asheera
Round Table Knight
Round Table Knight
Posts: 4506
Joined: 06 Jul 2008
Location: The Shadows
Contact:

Unread postby Asheera » 30 Oct 2008, 11:49

Can you post the script? Maybe you did something wrong with the triggers.

(note I never used the RemoveObject function, but if you said you've seen somewhere that it worked...)
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.

Sarvi
Leprechaun
Leprechaun
Posts: 46
Joined: 29 Sep 2006

Re: moving objects

Unread postby Sarvi » 30 Oct 2008, 11:50

Sarvi wrote:
Asheera wrote:What objects are you trying to remove?

For instance, SetObjectPosition and SetObjectRotation don't work for towns, unless you first call MakeTownMovable.
Today I just realized I've been stupid (a not uncommon occurrence!)!
Looking at the Object Properties Tree there is an option "IsMovable" which you can set to true or false. My objects were set to 'false' of course! And thats why they wouldn't move....Duh!

Why wasn't I told? Why didn't I look!
Ach wie schoen das niemand weiss....

User avatar
Asheera
Round Table Knight
Round Table Knight
Posts: 4506
Joined: 06 Jul 2008
Location: The Shadows
Contact:

Unread postby Asheera » 30 Oct 2008, 12:03

Sorry, I didn't make a serious map ever, but I know some theory stuff about scripting and such... that's why I didn't even know that there is a 'IsMovable' flag.
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 0 guests