Spawnframe + Summonframe

Braun

Member
How do you do the spawnframe?I'm having some trouble with it and was wondering if i can do it with obeditor. Can i use the wall method to find the coords of the spawnframe? How does it work? Spawnframe {frame} {z} {x} {a} {relative  1}



[attachment deleted by admin]
 
spawnframe and summonframe spawns other entity. It's relative position is defined by {x} {z} {y} and relative reference by last parameter
If last parameter is not set or set to 0, spawned entity will be relative to spawner's position
If last parameter is 1, spawned entity will be relative to screen edge

I suggest playing around with these two commands to understand more. Try spawning items first :)

Oh yes, before spawning anything, make sure the entity has been loaded first. Either loaded in models.txt, in level text or in spawner's text
 
This is what i have so far with it.


name morrigan
type player
health 200
speed 7
gfxshadow 1
shadow 5
noquake 1
candamage enemy obstacle
makeinv 3
riseinv 3
icon data/chars/morrigan/icon.gif





anim idle
spawnframe data/chars/morrigan/icon.gif 1
bbox 61 2 -58 92
offset 37 104
frame data/chars/morrigan/idle1-1.gif

#|edited by openBor Stats v 0.67

Thanks Bloodbane!

 
Look at these:

Spawnframe:
spawnframe {frame} {x} {z} {a} {relative}

    ~Used to make entity to spawn another entity. Normally it is used to spawn enemy. Spawning with this has no limit.
    ~The spawned entity is determined by 'subentity' or 'custentity'.
    ~{frame} determines at which frame the other entity is spawned.
    ~{x} determines spawn range in x axis.
    ~{z} determines spawn range in z axis.
    ~{a} determines spawn range in y axis.
    ~{relative} determines where the other entity is spawned.
        0, count from the spawner. Spawned entity will face same direction with the spawner.
        1, count from screen offset.
    ~Regardless of spawned entities, 'group' settings (see below) in level texts won't prevent them from being spawned at all. Though, after they are spawned, 'group' will still count them.

Summonframe:
summonframe {frame} {x} {z} {a} {relative}

    ~Used to make entity to spawn another entity. Normally it is used to spawn enemy. Spawning with this is limited to 1 entity.
    ~The spawned entity is determined by 'subentity' or 'custentity'.
    ~{frame} determines at which frame the other entity is spawned.
    ~{x} determines spawn range in x axis.
    ~{z} determines spawn range in z axis.
    ~{a} determines spawn range in y axis.
    ~{relative} determines where the other entity is spawned.
        0, count from the spawner. Spawned entity will face same direction with the spawner.
        1, count from screen offset.
    ~Summoned entity can be killed with 'unsummonframe'.
    ~Regardless of spawned entities, 'group' settings (see below) in level texts won't prevent them from being spawned at all. Though, after they are spawned, 'group' will still count them.

Example for spawnframe:

Code:
anim block
	loop       0
	delay      2
	offset     98 190
	bbox       0 0 0 0
	custentity gagent
	spawnframe 1 -60 0 280 0
	move       -5
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
	move       -8
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
	move       -4
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
	move       -2
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
        frame      data/chars/5geese/blk.gif
	move       0
	delay      8
        frame      data/chars/5geese/blk.gif
	delay      7
        frame      data/chars/5geese/idle01.gif
	sound      data/sounds/gee07.wav
        frame      data/chars/5geese/help01.gif
        frame      data/chars/5geese/help02.gif
        frame      data/chars/5geese/help03.gif
        frame      data/chars/5geese/help04.gif
        frame      data/chars/5geese/help03.gif
        frame      data/chars/5geese/help02.gif
        frame      data/chars/5geese/help03.gif
	delay      70
        frame      data/chars/5geese/help04.gif
	delay      6
        frame      data/chars/5geese/help03.gif
        frame      data/chars/5geese/help02.gif
        frame      data/chars/5geese/help01.gif
        frame      data/chars/5geese/idle01.gif
 
I got it! I'm working on it now.


anim special
spawnframe data/chars/yellow_iris/yellowiris.gif 1
subentity burst
bbox 88 7 -78 54
offset 47 78
frame data/chars/yellow_iris/special1-1.gif
delay 25
bbox 113 1 -52 74
frame data/chars/yellow_iris/special1-2.gif
frame data/chars/yellow_iris/special1-3.gif
bbox 132 4 -54 83
frame data/chars/yellow_iris/special1-4.gif
bbox 140 5 -90 80
frame data/chars/yellow_iris/special1-5.gif
I'm still a little lost on how you got this tho: 1 -60 0 280 0. I was trying to find a tab like bbox or offset but for now i'll just try gimp to get the coords.  I'm gonna do one with summomframe next.      Thanks Bloodbane and Maxman :)
 
You're way lost in position especially the x range part which is for straight left and right on ground. z range is for up and down on ground. That range a is when you're out of ground especially you jump up.

This one is absolutely wrong because you put path for the frame instead of frame number from this given animation. I'm not trying to sound rude but where the hell does that 1 with path come from for spawnframe? I noticed you were using 1 like icon. But it's not like icon in the header at all.

Wrong in red:

anim  special
  spawnframe  data/chars/yellow_iris/yellowiris.gif 1
  subentity  burst
  bbox  88 7 -78 54
  offset  47 78
  frame  data/chars/yellow_iris/special1-1.gif
  delay  25
  bbox  113 1 -52 74
  frame  data/chars/yellow_iris/special1-2.gif
  frame  data/chars/yellow_iris/special1-3.gif
  bbox  132 4 -54 83
  frame  data/chars/yellow_iris/special1-4.gif
  bbox  140 5 -90 80
  frame  data/chars/yellow_iris/special1-5.gif

That doesn't summon a sprite or frame at all. Try changing with this. Make sure it's in 5 values, each value with space. Not 25000 as in just one value. Look at the spaces carefully.

anim  special
  spawnframe  2 5 0 0 0
  subentity  burst
  bbox  88 7 -78 54
  offset  47 78
  frame  data/chars/yellow_iris/special1-1.gif # 0
  delay  25
  bbox  113 1 -52 74
  frame  data/chars/yellow_iris/special1-2.gif # 1
  frame  data/chars/yellow_iris/special1-3.gif # 2
  bbox  132 4 -54 83
  frame  data/chars/yellow_iris/special1-4.gif # 3
  bbox  140 5 -90 80
  frame  data/chars/yellow_iris/special1-5.gif # 4

I put labels of frame numbers above because I want you to know how spawnframe or summonframe is played. Plus you see how that burst entity you have will be summoned in a specific frame you call. For example, when you put 2, which is the third frame of your current animation, that entity will appear in that third frame. For 5, that burst entity will be 5 pixels away from Iris, so that means Iris is already 5 pixels BEHIND it.

I suggest you play around (and practice) with values of spawnframe or summonframe. Play with very small values first to see.
 
Thank You maxman! That's what i was looking for the frame numer at the end.
  frame  data/chars/yellow_iris/special1-1.gif # 0
  delay  25
  bbox  113 1 -52 74
  frame  data/chars/yellow_iris/special1-2.gif # 1
  frame  data/chars/yellow_iris/special1-3.gif # 2
  bbox  132 4 -54 83
  frame  data/chars/yellow_iris/special1-4.gif # 3
  bbox  140 5 -90 80
  frame  data/chars/yellow_iris/special1-5.gif # 4
Now we're gettnig somewher
 
this is Very useful. Now i have a better understanding.


"I put labels of frame numbers above because I want you to know how spawnframe or summonframe is played. Plus you see how that burst entity you have will be summoned in a specific frame you call. For example, when you put 2, which is the third frame of your current animation, that entity will appear in that third frame. For 5, that burst entity will be 5 pixels away from Iris, so that means Iris is already 5 pixels BEHIND it."

I was thinking the frame is the face so i added 1 to count offset. this is just the burst part.
        Thanks again maxman :D
 
Back
Top Bottom