use a global script

  • Thread starter Thread starter doranikofu
  • Start date Start date
D

doranikofu

Guest
“To use a global script, simply create the relevant script file and place it in data/scripts.”

thanks for the post but I don't quite get this. I assume you will need the full function script in the script file? Where can I find all the script files?
 
Search the scripting topic, there are many scripts that you can use. You copy the entire file, save it as [nameofscript].c and save it to data\scripts. Each of these scripts have different entry points and functions, for example levels.c affects when the program is now in a level or loading.c affects when the program initializes.

For entity events, same thing, then use either of the functions listed depending on the function of your scripts, usually animationscript.
 
doranikofu, before we discuss about using global script, why don't we start from what you are trying to achieve?
It's tough to give example of using global script without specific purpose or goal
 
Bloodbane said:
doranikofu, before we discuss about using global script, why don't we start from what you are trying to achieve?
It's tough to give example of using global script without specific purpose or goal
I'm trying to make a block+counter attack effect. Basically you block right at the moment of enemy hits you and you can stun them and then hit back. DC recommended checking "doattack" but I had hard time finding all the related script files
http://www.chronocrash.com/forum/index.php?topic=24.msg25851#msg25851
 
doattack refers to 'ondoattack', a level event like animationscript. It's not in the DCE Manual though, it's in the OpenBOR Wiki manual.

ondoattack
(version 2.955+) Engine confirms an attack hit. Runs on both Attacker AND Defender (Defender is called first, then Attacker). Takes place after engine performs hit confirmation, but before hit handling (pain, blocking, etc.) takes place. By setting variant lasthitc to 0, you can cancel engine's hit handling.

self: Caller.
other: When called on attacker, this recipient of attack. When called on defender, this is the attacker.
damage: attack damage.
drop: knockdown power.
attacktype: attack type, see 'openborconstant'.
noblock: block break force of attack.
guardcost: Guardcost of attack.
jugglecost: Jugglecost of attack.
pauseadd: Pause value of attack.
which:
0 = Caller is defender.
1 = Caller is attacker.
attackid: Current attack ID.

An example script is White Dragon's BACKPAIN script.


What DC meant by:
Damon Caskey said:
It's effective, but the downside is you can't use it in conjunction with a regular block system without some scripting - in which case you should be using doattack event anyway.

If you want to use counterrange, you have to script your own blocks. Searching the forum for answers can help with that.
 
Back
Top Bottom