User Tools

Site Tools


hpl3:engine:script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
hpl3:engine:script [2013/11/08 09:05]
ian.thomas [Important notes]
hpl3:engine:script [2014/02/18 07:24]
thomas [Comments]
Line 62: Line 62:
 cMonster@ pMonster = CurrentHit();​ cMonster@ pMonster = CurrentHit();​
 float fDamage = RandomDamage();​ float fDamage = RandomDamage();​
-fDamage -= pMonster->Defense();+fDamage -= pMonster.Defense();
 if(fDamage<​0) fDamage =0; if(fDamage<​0) fDamage =0;
 fDamage *= mfHitMultiplier;​ fDamage *= mfHitMultiplier;​
-pMonster->DecHealth(fDamage);​+pMonster.DecHealth(fDamage);​
 </​code>​ </​code>​
  
Line 337: Line 337:
 <code c++>​[nodatasave] cMyClass@ mNoSaveHandle;​ <code c++>​[nodatasave] cMyClass@ mNoSaveHandle;​
 </​code>​ </​code>​
 +
 +However it is almost always better to use the tID type for these situations!
  
  
hpl3/engine/script.txt ยท Last modified: 2020/07/01 07:07 by thomas