Right. I thought of that after I posted, but I didn't say it. Luckily I already have a custom player class. So it shouldn't be hard to set the new stuff up. As for Hotwax, you get ahold of him. Me and him tend to argue quite a bit.Enjay wrote:No, it's simpler than that. (At least my idea is simpler than that - there may be a better way) The DECORATE would check if the item was present in the player's inventory. If it was, it skips past the frame that drops the footprint actor. If the item isn't present, then the frame isn't skipped and the footprint gets dropped. That is all done with decorate.Nero wrote:If we use an inventory item, wouldn't we:
1. need an OPEN or ENTER script to be checking to see if the player has the item at all time in the map?
1.1 and if the player had the item then spawn the footprints?
2. need scripts that give or take that said inventory item?
The scripting would be used when the player enters or leaves a snowy area. As the player enters, a script removes the inventory item and the DECORATE stops skipping past the footprint frame. When the player leaves the snowy area, he is given back an inventory item so the DECORATE starts skipping past the footprint spawning frame again.
There is no need for an open or enter script to do it this way and, seeing as how you will need a custom player class anyway to drop the footprint, you can either give the inventory item as a startup item, or not, depending on whether the player is going to start in the snow or not.
As for the actual script, it would depend somewhat on how you set up your map, how many ways on and off the snowy area etc there were. This is the kind of script that the likes of HotWax seem to excel in so hopefully he, or some other talented scripter, can chip in at some point.
As for credit, all I've really done is show an example of how a footprint can be dropped. That really doesn't require much credit at all. A name check in the text file would be nice.
Spawning Sprites
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.
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.
- Sarah
- Posts: 551
- Joined: Wed Sep 06, 2006 12:36 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Debian 11 (bullseye), Windows 10
- Location: Middle of Nowheresville Il.
- Contact:
Re: Spawning Sprites
Re: Spawning Sprites
Hotwax is a mature sensible kind of chap. He doesn't strike me as the sort of person who would hold a grudge, especially if you are doing something like asking for some help in a suitable manner.
- Sarah
- Posts: 551
- Joined: Wed Sep 06, 2006 12:36 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Debian 11 (bullseye), Windows 10
- Location: Middle of Nowheresville Il.
- Contact:
Re: Spawning Sprites
Yeah ok.
Re: Spawning Sprites
The first method that popped into my head while reading the description of what Nero is trying to do is to use [wiki="Classes:SecActEnter"]SecActEnter[/wiki] and [wiki="Classes:SecActExit"]SecActExit[/wiki] actors in each of the snow sectors. The enter actors would give (or take, depending on how you set up your logic) the flag item and the exit actors would do the opposite.Enjay wrote:As for the actual script, it would depend somewhat on how you set up your map, how many ways on and off the snowy area etc there were. This is the kind of script that the likes of HotWax seem to excel in so hopefully he, or some other talented scripter, can chip in at some point.
As for checking whether the player is in the air, can't you do this with [wiki]A_JumpIf[/wiki]? I believe you can check the player's Z coord against the floor's height to see if there's a difference. Somebody more familiar with Decorate should be able to help there.
So basically, to bring it together. You'd need to define a flag item in Decorate (or use an existing one, as Enjay suggested), and use scripts called by sector action actors to give and take it. Then in the player's Decorate code, you'd have two checks; one to see if the player is not on the floor, the other to see if he's not on snow. Either check being true would skip the footprint spawning frame. As described, it should also be multiplayer-compatible, if that's a concern.
So now you just need to put all of this theory into practice. Let me know if you need any specific code snippets. The ACS part of it would probably be just a couple scripts that use [wiki]GiveInventory[/wiki] and [wiki]TakeInventory[/wiki] to set/unset the flag.
- Sarah
- Posts: 551
- Joined: Wed Sep 06, 2006 12:36 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Debian 11 (bullseye), Windows 10
- Location: Middle of Nowheresville Il.
- Contact:
Re: Spawning Sprites
Wow Hotwax. You have really helped. Breaking it down like that really helps me to organize the data structure in my head. Now I'm very VERY unfamiliar with DECORATE. Um I sent you a pm that doesn't appear to have been replied to yet, but that's ok. I guess this is the reply. Anyway, I'll try and do as much of the work as I can. Um, I can rely on you and Enjay for more help that would be great. Code snippets would be awesome.HotWax wrote:The first method that popped into my head while reading the description of what Nero is trying to do is to use [wiki="Classes:SecActEnter"]SecActEnter[/wiki] and [wiki="Classes:SecActExit"]SecActExit[/wiki] actors in each of the snow sectors. The enter actors would give (or take, depending on how you set up your logic) the flag item and the exit actors would do the opposite.Enjay wrote:As for the actual script, it would depend somewhat on how you set up your map, how many ways on and off the snowy area etc there were. This is the kind of script that the likes of HotWax seem to excel in so hopefully he, or some other talented scripter, can chip in at some point.
As for checking whether the player is in the air, can't you do this with [wiki]A_JumpIf[/wiki]? I believe you can check the player's Z coord against the floor's height to see if there's a difference. Somebody more familiar with Decorate should be able to help there.
So basically, to bring it together. You'd need to define a flag item in Decorate (or use an existing one, as Enjay suggested), and use scripts called by sector action actors to give and take it. Then in the player's Decorate code, you'd have two checks; one to see if the player is not on the floor, the other to see if he's not on snow. Either check being true would skip the footprint spawning frame. As described, it should also be multiplayer-compatible, if that's a concern.
So now you just need to put all of this theory into practice. Let me know if you need any specific code snippets. The ACS part of it would probably be just a couple scripts that use [wiki]GiveInventory[/wiki] and [wiki]TakeInventory[/wiki] to set/unset the flag.
Ok, first what is a flag item? How would I make that in DECORATE
Sector actions would be when the player crosses the line into the snow sector, as defined by falling snow and a snow texture on the ground
The Players Decorate code would be the custom player class I already created to force the player to walk and allow for the modified weapon bob. That added code would be the Jump_if modifiers to see if 1. the player was on the ground 2. to see if the players zheight was equal to "=" to the floor height? Then if the players zheight was not equal to the floor height, then skip the frame for the footprints. This is definently needed for ladders that are outside.
Next, how do I incorporate the files for the footprint? The game is not organized in a zip or pk3 and I wasn't going to do that. I have it organized to run a packaged version of gzdoom with it through a batch file. That lets me use a modified .ini file so that I do not effect players' other games. Where in the wiki would it tell me how to assemble the game in a .pk3 or zip so that I could include the footprints?
Mulitplayer compatability is not important in any way. This game is strictly single player only because of the nature of the game.
- Sarah
- Posts: 551
- Joined: Wed Sep 06, 2006 12:36 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Debian 11 (bullseye), Windows 10
- Location: Middle of Nowheresville Il.
- Contact:
Re: Spawning Sprites
Ok, first off, how do I get the footprint files that are the in zip that can be downloaded on another page of this post into the game without putting what I have into a pk3 or zip setup? Since I run the game through a batch file, could i just call the zip as well? would that work?
- Project Shadowcat
- Posts: 9369
- Joined: Thu Jul 14, 2005 8:33 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Blacksburg, SC USA
- Contact:
Re: Spawning Sprites
I think so. Just add the extra file on the -file string.Nero wrote:Ok, first off, how do I get the footprint files that are the in zip that can be downloaded on another page of this post into the game without putting what I have into a pk3 or zip setup? Since I run the game through a batch file, could i just call the zip as well? would that work?
Re: Spawning Sprites
Yes. A .zip and a .pk3 are the same thing, just with different extensions. You could rename Enjay's .zip to .pk3 and it would work fine.Nero wrote:Ok, first off, how do I get the footprint files that are the in zip that can be downloaded on another page of this post into the game without putting what I have into a pk3 or zip setup? Since I run the game through a batch file, could i just call the zip as well? would that work?
- Sarah
- Posts: 551
- Joined: Wed Sep 06, 2006 12:36 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Debian 11 (bullseye), Windows 10
- Location: Middle of Nowheresville Il.
- Contact:
Re: Spawning Sprites
Ok, awesome. I got the footprint.zip added to the game, however the only problem is that the player creates footprints wherever they walk. Now I need help getting it so that footprints do not spawn when the player jumps. Also, I need to get it set up so that the game only creates the footprints when the player has an item in their inventory. That way I can set it so that it only spawns footprints when the player is in the snow. That means I can use the Give and Take inventory ACS commands.
Code snippets are welcome. Just let me know where I should place them. Anybody that helps gets credit for this project!
I do not know how to code the Decorate so that it checks to see if the player is in the air.
I do not know how to code the Decorate to create the inventory item.
I do not know how to code the Decorate to check to see if the player has the item (or does that need to be done in ACS?)
Lots of help is still needed guys! Thanks!
Code snippets are welcome. Just let me know where I should place them. Anybody that helps gets credit for this project!
I do not know how to code the Decorate so that it checks to see if the player is in the air.
I do not know how to code the Decorate to create the inventory item.
I do not know how to code the Decorate to check to see if the player has the item (or does that need to be done in ACS?)
Lots of help is still needed guys! Thanks!
