A Liilte Scripting Help Please
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.
Alright, here it is. There are 3 examples of how to do it in the map.
The first way (room on your left at start) is the DECORATE way, copy and pasted exactly from what I posted above. If you want to have the monster physically drop the item, this is the best choice.
The second way (room on your right at start) is the ACS way you were trying to do it. It's mostly copied and pasted from what I posted above. I moved the spawn line out of the loop; it was my mistake to leave it in there (that was causing the problem of the key always appearing.) This setup is the worst choice of the three.
The third way is immediately behind you when you start. In game, it appears identical to method #2, but it is set up differently. What happens is the room just has a normal revenant. The revenant is given a thing special of 137 (which is Thing_SpawnNoFog) with the two arguments 3 (the mapspot to spawn at) and 89 (red skull key spawn number.) When a monster is given a thing special, that special is executed on the monster's death. So, when the revenant dies, a red skull key is spawned at the mapspot with tag 3. If you want the red skull key not to be dropped physically by the monster, this kind of method is a very good choice. An alternative to this is to give the revenant the ACS_Execute special and then have a script which spawns the red skull key in addition to maybe having some extra effects that make it obvious that killing the revenant has done something.
The first way (room on your left at start) is the DECORATE way, copy and pasted exactly from what I posted above. If you want to have the monster physically drop the item, this is the best choice.
The second way (room on your right at start) is the ACS way you were trying to do it. It's mostly copied and pasted from what I posted above. I moved the spawn line out of the loop; it was my mistake to leave it in there (that was causing the problem of the key always appearing.) This setup is the worst choice of the three.
The third way is immediately behind you when you start. In game, it appears identical to method #2, but it is set up differently. What happens is the room just has a normal revenant. The revenant is given a thing special of 137 (which is Thing_SpawnNoFog) with the two arguments 3 (the mapspot to spawn at) and 89 (red skull key spawn number.) When a monster is given a thing special, that special is executed on the monster's death. So, when the revenant dies, a red skull key is spawned at the mapspot with tag 3. If you want the red skull key not to be dropped physically by the monster, this kind of method is a very good choice. An alternative to this is to give the revenant the ACS_Execute special and then have a script which spawns the red skull key in addition to maybe having some extra effects that make it obvious that killing the revenant has done something.
That's a nice job, dude...
What bits me in the @ss is that I wrote the decorate the same way and I couldn't get it to work!
The script, on-the-other-hand, I was close, but shouldn't it have an [open] command instead of using an execute line, by using [void]?
Now, with the third option, that's what I've learn to do and it worked for me by my setting the attributes through my editor.
Thanks Zip... Think they should make you moderator!
What bits me in the @ss is that I wrote the decorate the same way and I couldn't get it to work!
The script, on-the-other-hand, I was close, but shouldn't it have an [open] command instead of using an execute line, by using [void]?
Now, with the third option, that's what I've learn to do and it worked for me by my setting the attributes through my editor.
Thanks Zip... Think they should make you moderator!
http://nash.wanzafran.com/doomstuff/revenantkey.zip
Here's something I put together real quick. It's very simple so I hope it should be easy for you to understand how it's done.
Here's something I put together real quick. It's very simple so I hope it should be easy for you to understand how it's done.
You know what!!!!
You guys are great man...!
Zip... Just to let you know that everyone of your apps worked! Sheesh!!! Here I was bangin my head on the wall trying to get this to work, then here you come along and, [POOF]! "There it is!"
Nash... Thank you brother...
There is a question I would like to run past both of you guys...
In the "Decorate"... Say I want to have three monsters leave the skulls. [In my map, the only way a player can complete the level, is to find and kill three monsters that have the skull keys... you need six keys to end the level.] Do I enter the three different monster commands in the same lump, or do I have to enter them seperately?
You guys are great man...!
Zip... Just to let you know that everyone of your apps worked! Sheesh!!! Here I was bangin my head on the wall trying to get this to work, then here you come along and, [POOF]! "There it is!"
Nash... Thank you brother...
There is a question I would like to run past both of you guys...
In the "Decorate"... Say I want to have three monsters leave the skulls. [In my map, the only way a player can complete the level, is to find and kill three monsters that have the skull keys... you need six keys to end the level.] Do I enter the three different monster commands in the same lump, or do I have to enter them seperately?
- Cutmanmike
- Posts: 11353
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
Same lump or another DECORATE lump, totally up to you. Also you can use inheritance to make this less painful
The monsters bluekeymonster and yellowkeymonster will inherit all information from the redkeymonster including actor properties, flags and states.
Code: Select all
actor redkeymonster
{
Speed 10
radius 10
height 20
Health 200
MONSTER
dropitem RedSkull
States
{
Spawn:
PLAY A 1 A_Look
Loop
See:
PLAY ABCD 1 A_Chase
Loop
Death:
PLAY N 0 A_Fall
PLAY N -1
Stop
}
}
actor bluekeymonster : redkeymonster
{
dropitem BlueSkull
}
actor yellowkeymonster : redkeymonster
{
dropitem YellowSkull
}
- Cutmanmike
- Posts: 11353
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
--------------------------------------------------------------------------------------I wrote:In the "Decorate"... Say I want to have three monsters leave the skulls. [In my map, the only way a player can complete the level, is to find and kill three monsters that have the skull keys... you need six keys to end the level.] Do I enter the three different monster commands in the same lump, or do I have to enter them seperately?
Ok guys, I've got this one taken care of, but I have another question that I think is a little more technical. I'm using the "revenant, kellknight and the "spidermastermind" to drop the three different skullkeys. Say I want to use one of those monsters to drop something else, elsewhere. Can I enter the same code and just change the "Doomnum" to seperate and show what particular decorated monster I want to use? Is this how this is done? Identification through Doomnum?
You mean like, for example, you want to also have revenant which drops a stimpack? Yes, then you can just have another new actor with a different Doom editor number:
Code: Select all
// This is the revenant from before, which drops the red skull key
ACTOR RevenantRedSkullKey : Revenant 12345
{
DropItem RedSkull
}
// This is a new actor, which is just a revenant which drops a stimpack.
// Notice the Doom editor number is different (12346 instead of 12345.)
// If you were to give it 12345, it would mean that you can no longer
// place the old guy in maps because you just replaced his number.
// ZDoom will actually give you a warning about that in the console if
// you were to try and do that.
ACTOR RevenantStimpack : Revenant 12346
{
DropItem Stimpack
}