What Entity Type to use for creating a 'Hostage' model?

Hi All,

I'm trying to create a 'hostage' entity such that when the player punches them it frees them and they run off the screen (exit to the left of the screen).

I was thinking I only need an "Idle" and "Fall" animation defined.

I've tried the following settings:
1) Type = Obstacle, but the hostage will bounce up like a drum/obstacle and disappear before the 'fall' animation can finish (don't really want the animation to act like a drum either).
2) Type = Enemy , this works but the hostage slides around on the ground 'walking'. lol Maybe need a way to disable their movement.
3) Type = Item, not ideal since the hostage disappears once picked up.
4) Type = npc, oddly nothing spawns when I use this.

Is there an existing mod/game that implements hostages that I can reference how it should/can be done?

Here is what my hostage entity txt looks like with type = obstacle:

C:
name    Woman1
health    1
type    obstacle
nodieblink 3

shadow    2

offscreenkill    50


anim idle
    loop 1
    delay    100
    offset    20 70
    bbox.position.x -5
    bbox.position.y -3
    bbox.size.x 51
    bbox.size.y 85
    nodrawmethod
    drawmethod flipx 0
    frame    data/chars/hostages/woman1/sit_tied_00.png  
    offset 33 77
    bbox.position.x 4
    bbox.position.y 6
    bbox.size.x 55
    bbox.size.y 81
    frame    data/chars/hostages/woman1/sit_tied_01.png
    frame    data/chars/hostages/woman1/sit_tied_02.png
    frame    data/chars/hostages/woman1/sit_tied_03.png
    frame    data/chars/hostages/woman1/sit_tied_04.png
   




anim fall
    delay    30
    offset    24 114
   
    frame    data/chars/hostages/woman1/freed_01.png
   
    delay 7
    offset 30 90
    frame    data/chars/hostages/woman1/freed_02.png  
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png  
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png  
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png  
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png  
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png  
    frame    data/chars/hostages/woman1/freed_03.png
   
    nodrawmethod
    drawmethod flipx 1
    delay 20
    move 20
    offset 49 89
    frame    data/chars/hostages/woman1/run_00.png  
    offset 49 88
    frame    data/chars/hostages/woman1/run_01.png
    frame    data/chars/hostages/woman1/run_02.png  
    offset 49 90
    frame    data/chars/hostages/woman1/run_03.png
    offset 49 89
    frame    data/chars/hostages/woman1/run_04.png  
    offset 49 91
    frame    data/chars/hostages/woman1/run_05.png
   
    offset 49 89
    frame    data/chars/hostages/woman1/run_00.png  
    offset 49 88
    frame    data/chars/hostages/woman1/run_01.png
    frame    data/chars/hostages/woman1/run_02.png  
    offset 49 90
    frame    data/chars/hostages/woman1/run_03.png
    offset 49 89
    frame    data/chars/hostages/woman1/run_04.png  
    offset 49 91
    frame    data/chars/hostages/woman1/run_05.png
   
    offset 49 89
    frame    data/chars/hostages/woman1/run_00.png  
    offset 49 88
    frame    data/chars/hostages/woman1/run_01.png
    frame    data/chars/hostages/woman1/run_02.png  
    offset 49 90
    frame    data/chars/hostages/woman1/run_03.png
    offset 49 89
    frame    data/chars/hostages/woman1/run_04.png  
    offset 49 91
    frame    data/chars/hostages/woman1/run_05.png
   
    offset 49 89
    frame    data/chars/hostages/woman1/run_00.png  
    offset 49 88
    frame    data/chars/hostages/woman1/run_01.png
    frame    data/chars/hostages/woman1/run_02.png  
    offset 49 90
    frame    data/chars/hostages/woman1/run_03.png
    offset 49 89
    frame    data/chars/hostages/woman1/run_04.png  
    offset 49 91
    frame    data/chars/hostages/woman1/run_05.png




From Legacy Manual:
type {type}

  • {type}:
    • player: The entity is a human-controlled player.
    • enemy: The entity is a CPU controlled enemy or enemy projectile.
    • npc: The entity is a CPU controlled ally that will seek out and attack
    • enemies. The entity is otherwise functionally identical to enemy entities with the chase subtype. You can change the NPC allegiance via hostile setting. Npc types do not count toward groups.
    • item: The entity is a stationary item which can be picked up. Items can only give one bonus per item. In other words, you can’t make one item that both gives 2000 points AND gives a 1-up.
    • none: The entity is a useless decoration.
    • steamer: The entity constantly spews the object called Steam upwards with alpha transparency. Default offscreenkill value is 80.
    • obstacle: The entity is a stationary blockade which can (normally) be destroyed.
    • text: The entity is a message object. When spawned, it will freeze all objects in play and show it’s *IDLE* animation, then dissapear. It can be sped up by pressing attack or jump. Can be used for level intros, mid-level cutscenes, etc.
    • trap: The entity is an obstacle which cannot be attacked. It can be made to attack, though, and will hit both players and enemies. If a trap is not set up to knock the entity down, the trap will only damage the entity one time. To hit them again, the target entity must take damage from another entity.
    • endlevel: The entity is an item which, when touched by a player, will end the stage. It can be given a score value to be awarded for level completion.
    • pshot: The type is outdated and does nothing. You can still use it, but it’s ignored.
    • panel:The entity will scroll together with level. If the entity’s speed is 10, entity will stay with panel. If the speed is 5, it will stay with background (for direction left,right and both). This type is used to make multiple layers.

Thank you.
 
Last edited:
Nevermind, I figured out what I did wrong.

Type = Enemy is perfect.

Only Idle and Fall animation is needed.

Also need to use "nomove 1 1" so that the enemy doesn't move at all.

Here's the entity txt for future folks to reference (nothing mind blowing, just had to figure out what I was missing):


C:
# Do not forget to name your character.
# Health is optional.

name    Woman1
health    10
type    enemy
nodieblink 3

shadow    2

offscreenkill    50
nomove 1 1
icon    data/chars/shermie/icon.gif
diesound data/sounds/eek.wav



anim idle
    loop 1
    delay    100
    offset    20 70
    bbox.position.x -5
    bbox.position.y -3
    bbox.size.x 51
    bbox.size.y 85
    nodrawmethod
    drawmethod flipx 0
    frame    data/chars/hostages/woman1/sit_tied_00.png   
    offset 33 77
    bbox.position.x 4
    bbox.position.y 6
    bbox.size.x 55
    bbox.size.y 81
    frame    data/chars/hostages/woman1/sit_tied_01.png
    frame    data/chars/hostages/woman1/sit_tied_02.png
    frame    data/chars/hostages/woman1/sit_tied_03.png
    frame    data/chars/hostages/woman1/sit_tied_04.png
    




anim fall
    delay    30
    offset    24 114
    
    frame    data/chars/hostages/woman1/freed_01.png
    
    delay 7
    offset 30 90
    frame    data/chars/hostages/woman1/freed_02.png   
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png   
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png   
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png   
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png   
    frame    data/chars/hostages/woman1/freed_03.png
    frame    data/chars/hostages/woman1/freed_02.png   
    frame    data/chars/hostages/woman1/freed_03.png
    
    nodrawmethod
    drawmethod flipx 1
    delay 20
    move -20
    offset 49 89
    frame    data/chars/hostages/woman1/run_00.png   
    offset 49 88
    frame    data/chars/hostages/woman1/run_01.png
    frame    data/chars/hostages/woman1/run_02.png   
    offset 49 90
    frame    data/chars/hostages/woman1/run_03.png
    offset 49 89
    frame    data/chars/hostages/woman1/run_04.png   
    offset 49 91
    frame    data/chars/hostages/woman1/run_05.png
    
    offset 49 89
    frame    data/chars/hostages/woman1/run_00.png   
    offset 49 88
    frame    data/chars/hostages/woman1/run_01.png
    frame    data/chars/hostages/woman1/run_02.png   
    offset 49 90
    frame    data/chars/hostages/woman1/run_03.png
    offset 49 89
    frame    data/chars/hostages/woman1/run_04.png   
    offset 49 91
    frame    data/chars/hostages/woman1/run_05.png
    
    offset 49 89
    frame    data/chars/hostages/woman1/run_00.png   
    offset 49 88
    frame    data/chars/hostages/woman1/run_01.png
    frame    data/chars/hostages/woman1/run_02.png   
    offset 49 90
    frame    data/chars/hostages/woman1/run_03.png
    offset 49 89
    frame    data/chars/hostages/woman1/run_04.png   
    offset 49 91
    frame    data/chars/hostages/woman1/run_05.png
    
    offset 49 89
    frame    data/chars/hostages/woman1/run_00.png   
    offset 49 88
    frame    data/chars/hostages/woman1/run_01.png
    frame    data/chars/hostages/woman1/run_02.png   
    offset 49 90
    frame    data/chars/hostages/woman1/run_03.png
    offset 49 89
    frame    data/chars/hostages/woman1/run_04.png   
    offset 49 91
    frame    data/chars/hostages/woman1/run_05.png
 
Obstacle type should work well for hostages not to mention it isn't counted by group.
Two things to remember about using obstacle type are:
1. You need to set death 1 so the obstacle's death doesn't bounce on ground. And of course, you need DEATH animation.
2. Obstacles are solid so you need to set platform 1 1 1 1 1 1 1 1 to disable the solidness and allow characters to walk past them.

This is captured child text from Rise of Warduke:
Code:
name        ChildC
type        enemy
health        1
gfxshadow    1
nomove        1 1
nolife        1
nopain        1
nodrop        2
death        1
nodieblink    2
cantgrab    1
animationscript    data/scripts/lescript.c

alternatepal    data/chars/misc/civilian/child2/map1.png
alternatepal    data/chars/misc/civilian/child2/map2.png
alternatepal    data/chars/misc/civilian/child2/map3.png

load        childR


anim idle
    loop    1
    delay    16
    offset    31 68
    bbox    20 42 22 26
sound   data/chars/misc/civilian/child2/help.wav
    frame   data/chars/misc/civilian/child2/captured1.png
    frame   data/chars/misc/civilian/child2/captured2.png

anim death
    delay    12
    offset    31 68
    frame   data/chars/misc/civilian/child2/free1.png
    frame   data/chars/misc/civilian/child2/free2.png
    frame   data/chars/misc/civilian/child2/free3.png
sound   data/chars/misc/civilian/child2/thankyou.wav
    @cmd    spawnM "childR" 0 0 0
    frame   data/chars/misc/empty.gif

This entity spawns childR which is running version of this child on its death.
I did this in case I want to spawn childR separately.
 
Obstacle type should work well for hostages not to mention it isn't counted by group.
Two things to remember about using obstacle type are:
1. You need to set death 1 so the obstacle's death doesn't bounce on ground. And of course, you need DEATH animation.
2. Obstacles are solid so you need to set platform 1 1 1 1 1 1 1 1 to disable the solidness and allow characters to walk past them.

This is captured child text from Rise of Warduke:
Code:
name        ChildC
type        enemy
health        1
gfxshadow    1
nomove        1 1
nolife        1
nopain        1
nodrop        2
death        1
nodieblink    2
cantgrab    1
animationscript    data/scripts/lescript.c

alternatepal    data/chars/misc/civilian/child2/map1.png
alternatepal    data/chars/misc/civilian/child2/map2.png
alternatepal    data/chars/misc/civilian/child2/map3.png

load        childR


anim idle
    loop    1
    delay    16
    offset    31 68
    bbox    20 42 22 26
sound   data/chars/misc/civilian/child2/help.wav
    frame   data/chars/misc/civilian/child2/captured1.png
    frame   data/chars/misc/civilian/child2/captured2.png

anim death
    delay    12
    offset    31 68
    frame   data/chars/misc/civilian/child2/free1.png
    frame   data/chars/misc/civilian/child2/free2.png
    frame   data/chars/misc/civilian/child2/free3.png
sound   data/chars/misc/civilian/child2/thankyou.wav
    @cmd    spawnM "childR" 0 0 0
    frame   data/chars/misc/empty.gif

This entity spawns childR which is running version of this child on its death.
I did this in case I want to spawn childR separately.
Ohh I see. So obstacle is even better. Ok got it. Very helpful, thank you @Bloodbane !
 
Back
Top Bottom