View topic - changing movement of units



All times are UTC + 1 hour


Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 07 Jul 2011, 22:53 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
http://springrts.com/wiki/Lua_MoveCtrl# ... ontrolling
Basically this only allows to controll turning, acceleration and max speed.

I wanted to make a powerup that gives units the the ability to cross water.

So I did this:
Spring.MoveCtrl.SetGroundMoveTypeData (unitID, "floatOnWater", true)
But it does not work, the unit still can no enter deep water. It also still tilts with the sea ground. (yes, can be changed with upright=true or something)
The only thing that changes is that in shallow water the unit gets lifted up to the waterplane.
Not really what I expected from "floatOnWater" :?
Image
flower pot -> floatOnWater=true
notice the tank in front without flower is sunk into the water but that is the only difference it makes.


Is that possible at all to change where a unit can go? (also regarding climbing ability)
Beside workarounds like unit swapping/morphing or
Code:
if (unitPosition.y < 0 and not hasWalkOnWaterUpgrade) then moveToPreviousPosition


Top
 Offline Profile  
 
PostPosted: 07 Jul 2011, 22:58 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
I hate to make this statement but as it is now the change from one class to another has always been done by quick switching of units


Top
 Offline Profile  
 
PostPosted: 07 Jul 2011, 22:59 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
It's the only way currently, unless you fancy using movectrl and writing your own pathfinder.

edit: Or do naughty things with transports.


Top
 Offline Profile  
 
PostPosted: 07 Jul 2011, 23:05 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
transports it is!
will probally turn out pretty meh but lets see.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.