Dual Movement System

Dual Movement System

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Emyfour
Posts: 13
Joined: 29 Mar 2014, 13:52

Dual Movement System

Post by Emyfour »

Hi there. Happy holidays. :mrgreen:

I'm wondering: is it possible to script a unit with a dual movement system?
I mean, something which can move in a way, with legs for example, while fighting, and in another way, with wheels maybe, while airily running around.

... Do you remember Star Wars' Droidekas?

Image

While happily shooting enemies, they slowly walk on their legs, but if they need a quick sprint, they can fold and roll.

... It would be nice if the unit alone could understand when to shoot and when to move, but it will be okay even if it actually requires a manual switch.

Thanks in advance :lol:
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Dual Movement System

Post by Silentwings »

As far as I know, that would be possible.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Dual Movement System

Post by FLOZi »

Imperial Winter has the droideka, so yes. It is possible.

(Ok, currently droideka is broked due to max wanted spede changes but if it were rewritten in lua it'd be fine)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Dual Movement System

Post by smoth »

It has nothing to do with movement systems this example is a matter of changing the animation and speed of a unit. That is all.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10452
Joined: 24 Jan 2006, 21:12

Re: Dual Movement System

Post by PicassoCT »

whats not really possible is pulsating movement.. meaning the units speed actually beeing of a non-linear type
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Dual Movement System

Post by Anarchid »

Visually, you can get that with animation, too.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Dual Movement System

Post by KDR_11k »

Or if you're crazy Lua it, take the pathing results for the unit and instead of letting it move normally teleport it along the path via Lua.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: Dual Movement System

Post by dansan »

Isn't that what pelikan in BA does (walks on land, swims in sea)?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10452
Joined: 24 Jan 2006, 21:12

Re: Dual Movement System

Post by PicassoCT »

Anarchid wrote:Visually, you can get that with animation, too.

Example? One that doesent have a "sliding and moonwalking" over the floor moment? Show me a mecha that walks a step and perfectly stands still for a split second.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Dual Movement System

Post by smoth »

PicassoCT wrote:
Anarchid wrote:Visually, you can get that with animation, too.

Example? One that doesent have a "sliding and moonwalking" over the floor moment? Show me a mecha that walks a step and perfectly stands still for a split second.
your animation would need to time it's self to the actual speed. Not many have done that. I mean I have but not everyone has.

you would need to write code to the speed adjustments. what game actually does this and doesn't do it via smoke and mirrors?

the sliding you speak of is part of the braking code for units, raise your break rate if you don't want units sliding while stoping.
User avatar
Emyfour
Posts: 13
Joined: 29 Mar 2014, 13:52

Re: Dual Movement System

Post by Emyfour »

smoth wrote:It has nothing to do with movement systems this example is a matter of changing the animation and speed of a unit. That is all.
Uhm... you're right :|
But, can I explain to the unit that it can't Fight if its speed is higher than a value? That is, if it's "running" and not "walking"? :?
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Dual Movement System

Post by Anarchid »

Can't Fight (order, command type), or can't Shoot (action fully controllable by animation system)?

Former is possible and will require a gadget.

Latter is possible and requires you to implement BlockShot (or similar) callin in your animation script.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10452
Joined: 24 Jan 2006, 21:12

Re: Dual Movement System

Post by PicassoCT »

Emyfour wrote:
smoth wrote:It has nothing to do with movement systems this example is a matter of changing the animation and speed of a unit. That is all.
Uhm... you're right :|
But, can I explain to the unit that it can't Fight if its speed is higher than a value? That is, if it's "running" and not "walking"? :?
oh that one is easy..
you basically set a value to one or zero in the aiming task and the unit will not be able to aim while beeing fast - thus not be able to fire...
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Dual Movement System

Post by knorke »

Possible and similiar stuff was done. Example would be the "sprint gadget" that used to be in Complete Annihilation (and then some other mods) that allowed units to get a temporary speed-boost, similiar to the stim-packs of Starcraft.These spiders walk when their next waypoint is near but if the next waypoint is far away then they prefer to dig under the ground: https://www.youtube.com/watch?v=3ujUFqw398Y Sorry, do not have links to either handy atm.
But http://springrts.com/wiki/SetMoveTypeDataExample is an example that shows both how to alter a unit's movement as well as how to add "manual switch" buttons.
PicassoCT wrote:whats not really possible is pulsating movement.. meaning the units speed actually beeing of a non-linear type
not sure what excactly you mean but something like this works for Ba-Bop-Ba-Dop-Bop:

Code: Select all

while (true) do
		Spring.MoveCtrl.SetGroundMoveTypeData(unitID, "maxSpeed", 0)
		Sleep (1000)
		Spring.MoveCtrl.SetGroundMoveTypeData(unitID, "maxSpeed", 50)
		Sleep (1000)
	end
This way it is possible to make movement like https://www.youtube.com/watch?v=_I_MaU9H5sI ,without having to re-do the whole movement-physics via movectrl.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Dual Movement System

Post by smoth »

Emyfour wrote:
smoth wrote:It has nothing to do with movement systems this example is a matter of changing the animation and speed of a unit. That is all.
Uhm... you're right :|
But, can I explain to the unit that it can't Fight if its speed is higher than a value? That is, if it's "running" and not "walking"? :?
Yes you can. :)
Post Reply

Return to “Game Development”