Not "falling" with floor gib

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Not "falling" with floor gib

Post by DBThanatos »

Ok, I have a similar problem. Of course I tried the method that worked last time, still it doesnt seems to work for this case.

This is a bouncing gib, and works almost perfectly, but it have the "not falling" problem.

Code: Select all

actor Gib1
{
    BounceFactor 0.45
    +DOOMBOUNCE
    Speed 8
    Projectile
    Scale 0.75
    -NOGRAVITY
                           //the recently added ones
	-NOLIFTDROP
	-SOLID
	+DROPOFF
//	+NOTELEPORT
//	+CORPSE

    States
    {
    Spawn:
	  NULL A 0
	  TNT1 A 1 ThrustThingZ(0,random(10,60),0,1)
        GIB1 AABBCCDDEEFFGG 2 A_SpawnItemEx("GibBloodSmall",0,0,0,0,0,0,0,1)
        Goto Death
    Death:
        GIB1 F 350
        GIB1 F 2 A_FadeOut
	  Wait
    }
}
I believe it has to do with the fact that this thing is actually a projectile, and not a simple decorative actor; but seems like the only way to make one thing bounce is making it a projectile. Am I right on this? if not, how can be done?

Thanks in advance




//********************************************************************
// Old post
//********************************************************************
Spoiler:
Last edited by DBThanatos on Wed Jun 04, 2008 12:54 am, edited 2 times in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Overuse of inventory items?

Post by Graf Zahl »

Yes, this can cause a performance hit, but not for the inventory items. Spawning an actor is a very time consuming operation so if you do it this excessively in a single frame you might experience some lag.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Overuse of inventory items?

Post by DBThanatos »

Thanks for the answer. I have been trying to be careful in not calling too many actors at the same time (the blood trails might cause the lag though)

But after all, I'll have to spawn this things via a_spawnitemex rather than A_TossGib, mostly for the blood color translation. oh well :P

yet, I think this code will still help, it'll save me making 20 different actors (gibs).


EDIT: ohh darn! I think this is going to be a bit hard. For each blood color needed I have to make another actor which have the blood translation color, that will pass it to the spawned actor...
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Not "falling" with floor gib

Post by DBThanatos »

I updated the 1st post with my actual question: What did I miss to make this lower with the floor? As is right now, if the meat ends in a platform that will lower/raise, when it happens, the gib stands in the same place: floating in the middle of nothing (if the platform lowered) or inside the platform (if it raised).
I tried to change the "FloorHugger" flag in the crash state, it didnt work.

Any suggestion?
CaptainToenail
Posts: 3975
Joined: Fri Jul 06, 2007 9:16 am

Re: Not "falling" with floor gib

Post by CaptainToenail »

Perhaps give it a mass? Looking at that code it should really fall, or perhaps try -NOGRAVITY, or -NOLIFTDROP?
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm
Contact:

Re: Not "falling" with floor gib

Post by MG_Man »

Use -SOLID instead of +NOBLOCKMAP. I've had similar problems like this and this seems to have fixed it.

Oh also, instead of using an inventory hack, you can use A_CheckFloor in the lines you want to to make it jump to where you need it to.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Not "falling" with floor gib

Post by DBThanatos »

@captaintoenail: I tried the things you suggested, even all three at the same time, but didnt work. Thanks though.

@MG_man: Yes that was actually the solution! And, about the A_CheckFloor yeah that's better too :P I used the crash state because i am very used to that method, but now have been proved that in certain situations, A_CheckFloor is better. Thanks
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm
Contact:

Re: Not "falling" with floor gib

Post by MG_Man »

Heh, don't worry, I royally abused Crash myself too. I also still find it easier to use for things that aren't random. :D
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Not "falling" with floor gib

Post by DBThanatos »

BUMP

Ok, I have a similar problem. Of course I tried the method that worked last time, still it doesnt seems to work for this case.

This is a bouncing gib, and works almost perfectly, but it have the "not falling" problem.

Code: Select all

actor Gib1
{
    BounceFactor 0.45
    +DOOMBOUNCE
    Speed 8
    Projectile
    Scale 0.75
    -NOGRAVITY
                           //the recently added ones
	-NOLIFTDROP
	-SOLID
	+DROPOFF
//	+NOTELEPORT
//	+CORPSE

    States
    {
    Spawn:
	  NULL A 0
	  TNT1 A 1 ThrustThingZ(0,random(10,60),0,1)
        GIB1 AABBCCDDEEFFGG 2 A_SpawnItemEx("GibBloodSmall",0,0,0,0,0,0,0,1)
        Goto Death
    Death:
        GIB1 F 350
        GIB1 F 2 A_FadeOut
	  Wait
    }
}
I believe it has to do with the fact that this thing is actually a projectile, and not a simple decorative actor; but seems like the only way to make one thing bounce is making it a projectile. Am I right on this? if not, how can be done?

Thanks in advance
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Not "falling" with floor gib

Post by Matt »

wat

EDIT: Ohhh, right, that's the new actor in the OP.

"Projectile" includes "+noblockmap", so you'll have to specify "-noblockmap" in this actor.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Not "falling" with floor gib

Post by DBThanatos »

Ohh! thank you very much!! :D That was it.
Locked

Return to “Editing (Archive)”