Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
pablogener

problem with DECORATE

Recommended Posts

I exported 4 .png's from the IWad and cropped them a bit, to get them to be something else (the red torches, I cut out the pole, so I get just the fire. I want a 'burning fire' sprite...).
I CAN import those cropped .png's to my .wad but the thing is I need to do something to get one pic to be displayed after the other and then loop, so that the 'on-burning fire' effect occurs.
I intuit this has to do something with the "DECORATE" lump, but I'm not sure. Can anyone tell me what to do to 'create a custom sprite' inside my pwad, so I can use it with Doom Builder 2?

thanks in advance for the help.

Share this post


Link to post

I've imported 4 .png's to my pwad, right between 'SS_START' and 'SS_END' markers.

then, added a 'DECORATE' lump, and put this code in it:

ACTOR BurningFire 260
{
	Height 40
	Radius 20
	+SOLID
	States
	{
	Spawn:
		BFIR A 10 Bright A_Look
		BFIR B 10
		BFIR C 10
		BFIR D 10
		loop
		
	}

}
When I go to Doom Builder 2 and open my pwad, I switch to 'Things' mode and look for a sprite numbered '260' and I see my 'Burning Fire' sprite, under the 'Decorate' node. I place 1 on the map and test-run it, to see how things go.

When the map loads, no errors or warnings show up, but when I start playing, right where I placed the sprite I see a generic '!' sign, flying, telling me something has gone wrong, and then I check the console and the last message reads:
'Burning Fire at xxxx-yyyy has no frames'

what's wrong with my 'DECORATE'?
please.. pleeeeeaaaaassseeeeee!! help!!!!

Share this post


Link to post

Try this:

actor BurningFire 260
{
  Height 40
  Radius 20
  +SOLID
  States
  {
  Spawn:
    BFIR ABCD 10 Bright
    Loop
  }
}
Also, make sure you renamed all the sprites to "BFIR" A-D.

Share this post


Link to post
Krispy said:

Also, make sure you renamed all the sprites to "BFIR" A-D.

BFIRA0, BFIRB0, BFIRC0 & BFIRD0 to be precise. The number zero at the end of each sprite name means it's always facing you, regardless of viewing angle.

Share this post


Link to post

I will try your code, but the only difference I see is a few 'case difference' cases...heh
could that be it??
I'll let you know in a while.

Share this post


Link to post
GreyGhost said:

BFIRA0, BFIRB0, BFIRC0 & BFIRD0 to be precise. The number zero at the end of each sprite name means it's always facing you, regardless of viewing angle.

ooooooooooooohoohohoooo! that's new!! ok, that '0 is always facing you' part is NO-F***ING-WHERE to be found on ANY tutorial!!
ok, thanks for the heads up, will try THAT now.

Share this post


Link to post

ok, it WORKED!! I see my item on Doom Builder 2, and see it rendered in zDooM!! this is amazing, I just added 'textures' (made up from patches I included in my pwad) and now created a new sprite!!

ok, the thing now is that it seems I can 'pick up' the 'burning fire' sprite. how can I avoid this and make my sprite STAY THERE where I put it, and .. well, I'll ask later on other things...

Share this post


Link to post
pablogener said:

ok, the thing now is that it seems I can 'pick up' the 'burning fire' sprite.

That's strange, are any other DECORATE actors in your wad (or other wads that are loaded with it) using the number 260?

Share this post


Link to post

not really, but I'm willing to change the number to something else if its mandatory. I just want to know if there is a numeric interval that is safe to use. anything above 259 and up to 800 seemed free in the 'zdoom things number list' from the wiki. what do you guys normally use?

Share this post


Link to post
pablogener said:

ooooooooooooohoohohoooo! that's new!! ok, that '0 is always facing you' part is NO-F***ING-WHERE to be found on ANY tutorial!!

I don't know about any tutorials, but it's there in the ZDoom Wiki.

pablogener said:

ok, the thing now is that it seems I can 'pick up' the 'burning fire' sprite.

Not sure what your code is right now, but unless you inherit from the Inventory actor class or one of its sub-classes, I don't think you can pick an actor up.

Share this post


Link to post
pablogener said:

not really, but I'm willing to change the number to something else if its mandatory. I just want to know if there is a numeric interval that is safe to use. anything above 259 and up to 800 seemed free in the 'zdoom things number list' from the wiki. what do you guys normally use?

Personally I've (for whatever reason) assigned my first ever custom decorate actor for my big project the number 6666 and just went lower from there. I think the newest one I have right now is somewhere in the 6620-6630 area, and they've all been working perfectly (barring whatever mistakes in their code I made or a couple bugs the whole thing has that had to do with certain functions and whatnot).

Share this post


Link to post
pablogener said:

not really,

Yes, no, or not sure? Double-defined actors should be identified by number in the console when you test/play a map. To aid in debugging I use a plain text file called autoexec.cfg which contains the following line -

logfile log.txt
Drop a copy of it in your GZDoom/ZDoom/Zandronum folder and they'll write whatever appears in the console to a log file. GZDoom and ZDoom will erase any existing log.txt file and write a new one (it pays to check between tests) while Zandronum appends a timestamp to the filename, so you can soon find yourself with a folder full of log files.

I just want to know if there is a numeric interval that is safe to use. anything above 259 and up to 800 seemed free in the 'zdoom things number list' from the wiki.

Any number that isn't reserved for a supported game is safe to use, all that's left then is to check what numbers are being used by other custom actors and I don't recall seeing any pattern in the way they're allocated. I'd suggest you create and maintain a list of numbers used by actors in your project.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×