[Tote] SetObjectPosition and ships

Maps and the art of mapmaking.
User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

[Tote] SetObjectPosition and ships

Unread postby Jonas » 08 Feb 2009, 04:12

Is there any trick to move a ship with script? If I use SetObjectPosition with a ship the game crashes to desktop everytime the function is triggered.
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

Franzy
War Dancer
War Dancer
Posts: 362
Joined: 07 Sep 2007
Location: Moscow, Russia
Contact:

Unread postby Franzy » 09 Feb 2009, 08:40

Yes, if you move empty ship, the game crashes. I've found the solution for case in which you need the ship as an interactive object, not as a mean of transportation :)

I simply created a new object that was a floating chest in nature, but looked like a ship (changed model). Then SetObjectEnabled and OBJECT_TOUCH_TRIGGER did all the rest.

If you do need a ship as a ship, you can still make that trick. Just remember that when you teleport a hero on water (SetObjectPosition...), he is automatically placed in the ship.

User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

Unread postby Jonas » 09 Feb 2009, 13:38

Thanks Franzy! I'll try it :D
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

mweil86
Leprechaun
Leprechaun
Posts: 13
Joined: 11 Sep 2007

Unread postby mweil86 » 13 Oct 2009, 23:48

I've tried using SetObjectPosition to put a hero in a ship but it just moves the hero so it is standing on top of the water. It is not in a ship and cannot move. What is wrong?

Franzy
War Dancer
War Dancer
Posts: 362
Joined: 07 Sep 2007
Location: Moscow, Russia
Contact:

Unread postby Franzy » 14 Oct 2009, 14:59

No, you just teleport hero on water, he will get a boat automatically.

mweil86
Leprechaun
Leprechaun
Posts: 13
Joined: 11 Sep 2007

Unread postby mweil86 » 15 Oct 2009, 19:55

That is what I did. I teleported a hero onto an empty water space using SetObjectPosition and the hero just appears standing on the water.

Franzy
War Dancer
War Dancer
Posts: 362
Joined: 07 Sep 2007
Location: Moscow, Russia
Contact:

Unread postby Franzy » 15 Oct 2009, 20:07

Strange. Worked for me.


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 0 guests