help with scripted methods or commands for affecting other entities

oldyz

Well-known member
This account is temporarily muted.
Greetings -

i would like to have some samples where either and inline script or scripted command do the following:

damage a specific entity

(it seems that damageentity is used majorly to damage the "self")

my attempt, based on scripts found troughtout NSX

Code:
anim death
    delay 300
    jumpframe 0 0 -3 0
    offset  117 167
    bbox    99 77 42 65
######## 2024 damage kill MusB ##############
    @script

    if (frame == 1){
        damageentity(MusB, self, 1000, 1, openborconstant("ATK_NORMAL"));
    }
    @end_script
######## 2024 damage kill MusB end ##############
    frame    data/chars/aramer/09
    frame    data/chars/aramer/09

force a change of an specific entity´s animation
example (from idle to dizzy)

forcing a specific entity to change into another, without the use of weapon model

exclude or include and entity from a group
 
If you need to modify an entity, you'd need the handle of that entity. If that entity is related to the script runner entity, it would be easier to acquire that handle. Ex: a boss could kill spawned minions on his/her death if needed. The boss could store the handle of each spawned minion on his/her entity variables after spawning each minion.

If to be modified entity isn't related to script runner entity, it would require extra work to acquire the former.

I could ask further about this relation but I rather ask what is actually you want to achieve with these scripts?
 
@Bloodbane
well, for the bonus stage i have a "conductor" entity appear as the first entity-
it spawns the gargoyle at an exact time , so it matches the music,

since the gargoyle is not a part of any group, thanks to rando type trickery, i need to make sure that when the gargoyle dies, its death animation frames damage the "conductor", using this damage i can have the conductor either change to an anim_special, or go to his death animation.

i set the conductor entity as boss1, so when it dies it finishes the level in a better fashion.

for the carriage stage i want to do the same thing, use a timer or conductor entity that changes the animation of the carriage's driver depending on the timed frames of the "conductor" or timer entity, and vice versa, coach driver can also affect conductor's health and or animations...
 
Since the conductor spawns the gargoyle, you could set the latter as child of the former. Then when gargoyle dies, it could set a flag in conductor's entity variable to tell that it has died. The conductor who checks that flag frequently could decide what to do next when the flag is set.
 
Back
Top Bottom