2025-07-18 20:28 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003016Spring engineUnit Scriptingpublic2012-03-24 01:02
Reporteruser744 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version87.0 
Target VersionFixed in Version 
Summary0003016: changing unit speed does not work in script.Create() anymore
Description--make unit immobile on creation:
function script.Create()
  Spring.MoveCtrl.SetGroundMoveTypeData(unitID, "maxSpeed", 0)
...

This used to work*, but in 87.0 it does nothing.
(sorry dont recall exacactly until when it worked, pretty sure it worked in 85)

It works when used in other callins:
function script.Deactivate ()
  Spring.MoveCtrl.SetGroundMoveTypeData(unitID, "maxSpeed", 0)

Now you can make the unit immobile by turning it off.

Adding a Sleep like this:
function script.Create()
  Sleep (200)
  Spring.MoveCtrl.SetGroundMoveTypeData(unitID, "maxSpeed", 0)
does nothing.

Being able to change unit speed in script.create() is somewhat important as workaround for http://springrts.com/mantis/view.php?id=2877
Additional InformationI actually use numbers > 0 (its for some speed upgrade system) but that has no effect and with 0 it is easier to see.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
related to 0002877resolvedKloot Changing of unit's max velocity is no longer possible 
+Relationships

-Notes

~0008495

Kloot (developer)

it's fixed, but you need to go 88+ mph to notice
+Notes

-Issue History
Date Modified Username Field Change
2012-03-14 02:10 user744 New Issue
2012-03-14 03:10 abma Relationship added related to 0002877
2012-03-24 01:02 Kloot Note Added: 0008495
2012-03-24 01:02 Kloot Status new => resolved
2012-03-24 01:02 Kloot Resolution open => fixed
2012-03-24 01:02 Kloot Assigned To => Kloot
+Issue History