| Author |
Message |
DevGIB
Joined: 06 Feb 2006 Posts: 93
|
Posted: Sun Jul 02, 2006 12:47 pm Post subject: Start_Script(script, params) |
|
|
Ok i have a new problem to do with start script... well its not a problem i just dotn think its working how the scripter meant it to work... if someone could help me this would be greatly appreciated.
start_script line:
| Code: | | start_script (":combat:"+hitscript, {attacker, defender, attacker.weapon, def_armor, wbasedamage, 0}); |
wil this work properly
| Code: | | program mainhit(attacker, defender, weapon, armor, basedamage, rawdamage) |
it seems as tho passing everything in an array it doesnt come through properly... |
|
 |
|
|
 |
 |
| Author |
Message |
tekproxy Distro Developer
Joined: 06 Apr 2006 Posts: 350 Location: Nederland, Texas
|
Posted: Sun Jul 02, 2006 1:07 pm Post subject: |
|
|
You have to grab all of the params from the array like this:
| Code: | | Start_Script(":combat:"+hitscript, array{attacker, defender, vbasedamage, 0}) |
| Code: | program mainHit(params)
var attacker := params[1];
var defender := params[2];
var base_damage := params[3];
var raw_damage := params[4];
// Combat hooks are complicated, good luck!
// Make sure it's as optimized as possible
// You _could_ just use the combat hook in the distro...
|
One should not have to pass attacker.weapon or def_armor if one already has access to the attacker and defender mobile refrences, but if you do, just put them in.
Last edited by tekproxy on Sun Jul 02, 2006 1:24 pm; edited 1 time in total |
|
 |
|
|