View topic - Found a bug in lua syncedctrl cloaking



All times are UTC + 1 hour


Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 02 Jul 2011, 11:37 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
This is current engine version.

Wiki wrote:
Unit LOS

Spring.SetUnitCloak

( number unitID,
boolean cloaked | number scriptCloak,
[ number decloakDistance | boolean decloakAbs ] ) -> nil


If the 2nd argument is a number, the value works like this:
1:=normal cloak
2:=for free cloak (cost no E)
3:=for free + no decloaking (except the unit is stunned)
4>=ultimative cloak (no ecost, no decloaking, no stunned decloak)

The decloak distance is only changed if the 3th argument is a number or a boolean.
If the boolean is false it takes the default decloak distance for that unitdef,
if the boolean is true it takes the absolute value of it.


I am using cloak 2, and for whatever reason, if the unit has a cloak cost defined, that cost is deducted when this ctrl is initiated.

1 should do that, but not 2 3 or 4.

To reproduce, load up evo 1.6 on a map with trees, move an all terrain unit into the trees and you will be charged -2 energy for the entire time that that unit spends being cloaked.


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

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:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.