Mewdoom Posted October 6, 2016 Hello guys, I have an actor that spawnitem, I want to know if the item spawned correctly so I use JumpIfInventory, but it look like the A_GiveInventory doesnt work because it doesnt jump to "Stuck2" ..it always jump to stuck1 ... calling actor: SUC1 A 0 Bright A_SpawnItemEx("WalkFire1",0,0,0,1,0,0,0,SXF_SETTARGET ) TNT1 A 0 A_JumpIfInventory("Ammo", 1, "Stuck2") Goto Stuck1 ACTOR WalkFire1 { +MISSILE +NODROPOFF +RANDOMIZE //+PAINLESS +RIPPER // ajouté +NOTELEPORT // ajouté Scale 1.5 Speed 1 Damage 1 // ajouté Damagetype "HellFire" // ajouté Obituary "%o was scorched by a Succubus" // ajouté RENDERSTYLE ADD ALPHA 0.67 States { Spawn: TNT1 A 1 FRTF A 3 Bright FRTF A 0 FRTF B 3 Bright FRTF B 0 FRTF C 3 Bright FRTF C 0 FRTF C 0 TNT1 A 0 A_SpawnItemEx("DropFire") FRTF DEFGHIJKLMNO 3 Bright TNT1 A 0 A_GiveInventory("Ammo", 1, AAPTR_TARGET) Stop Death: FRTF C 0 A_CheckFloor("Spawn") Stop } } 0 Share this post Link to post
Graf Zahl Posted October 7, 2016 Your A_Jump depends in inventory type "Ammo". Ammo is a base class for all ammunition types which you should never own. You should try this with an inventory item you define yourself somewhere. But I think the real problem is that you check the inventory long before the spawned actor hands out the item, but its hard to tell because you posted only a fragment of your calling actor. Can you explain in more detail what you intend to do? 0 Share this post Link to post
Mewdoom Posted October 8, 2016 Thanks for your help, I found the bug :) it is because the spawnitem doest have enough time to give the item before check for the item in the master actor :) I use this method to check if the fire appear, because ifnot that mean the actor is stuck on wall :) 0 Share this post Link to post