getAllHitPointsDamage – Talk

From Bohemia Interactive Community
Revision as of 16:23, 23 April 2016 by Killzone Kid (talk | contribs) (→‎Notes from main page: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Notes from main page

Posted on September 27, 2015 - 00:42 (UTC)
PabstMirror
Will only return [] instead of [[],[],[]] if object has no hitpoints
Posted on April 22, 2016 - 23:40 (UTC)
Pierre MGI
To implement the PabstMirror's note, for example, cursorTarget (or cursorobject) pointing at sky returns [], but, pointing at a building like "Land_dp_smallFactory_F" returns [[],[],[]]. Hard to manage if you want to script something with the figures in third array. Try an intermediate value like _intermediate = if (getAllHitPointsDamage cursorObject isEqualTo [] or getAllHitPointsDamage cursorObject isEqualTo [[],[],[]]) then [{[[""],[""],[0]]},{getAllHitPointsDamage cursorObject}];

Moving these notes here from main page. 1. [] is returned only when object is null or has no shape. If object has shape but no hitpoints it will return [[],[],[]]. This has been added to the description so the 1st note is now obsolete, moved here for historical keeping. 2. substituting return of [[],[],[]] with [[""],[""],[0]] is wrong. getAllHitPointsDamage has result ordered with hit index in mind so [[""],[""],[0]] would mean that object has 1 hitpoint with index 0, that has no name. This is plain wrong if object in fact has no hitpoints. Keeping this so no one will attempt to make this mistake in the futureKillzone Kid (talk) 16:23, 23 April 2016 (CEST)