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

Keys don't work? Is this decorate script ok?

Recommended Posts

Ok so I replaced actors in decorate to make some keys able to float and not be affected by gravity.

The problem is, they don't actually work? Is this decorate script ok?

For example -

actor YellowSkullbob: yellowskull replaces yellowskull
{
+floatbob
+nogravity
}


and the yellow skull won't work on doors?

Share this post


Link to post

Of course it will not work. After all, you effectively made a new type of key.

What you need to do is to attach a LOCKDEFS to the new key.
For example: new key

[edit]
removed link to example pwad since HXCpr0n clearly wasn't interested in checking it out.

Share this post


Link to post

that link is down.. I'm still having trouble with it. I tried to make lockdefs for each of my skull keys but they still aren't working

Share this post


Link to post

If you are having problems with some code that you have written, it really helps if you post that code. Otherwise anyone trying to help is just shooting in the dark (which, to be fair, is something that Doomers should be quite good at ;) ).

Yeah, so, post your code and people will be far more likely to be able to spot the error quickly rather than have to guess what you might have done.

Share this post


Link to post
Enjay said:

If you are having problems with some code that you have written, it really helps if you post that code. Otherwise anyone trying to help is just shooting in the dark (which, to be fair, is something that Doomers should be quite good at ;) ).

Yeah, so, post your code and people will be far more likely to be able to spot the error quickly rather than have to guess what you might have done.


My bad. Usually I know better, I was tired last night from working on school stuff lol.

So here I have my floating yellow key that bobs up and down. I called it "Yellowskullkey" in DECORATE

actor Yellowskullkey: yellowskull replaces yellowskull
{
+floatbob
+nogravity
}


Now this is my entry in LOCKDEFS

Lock 200
{
Yellowskullkey
Message "You need a Yellow Skull to open this door"
RemoteMessage "You need a Yellow Skull to open this door"
Mapcolor 255 147 0
}


And Kappes, I checked that wad out and used that code

Share this post


Link to post

OK, well, I'm not very familiar with lockdefs but you seem to be trying to add a new type whereas I *think* you just want to replace the original yellowskull - right?

So, I *think* this will work. It adds your actor to every lock type that uses the original yellowskull. Someone please correct me if I'm wrong.

Lock 6 Doom
{
	Any { YellowSkull Yellowskullkey }
	Message "$PD_YELLOWS"
	RemoteMessage "$PD_YELLOWSO"
	Mapcolor 255 255 0
}

Lock 131 Doom
{
	Any { YellowCard YellowSkull KeyYellow Yellowskullkey }
	Message "$PD_YELLOWK"
	RemoteMessage "$PD_YELLOWO"
	Mapcolor 255 255 0
}

Lock 134 Doom
{
	Any { YellowCard YellowSkull Yellowskullkey }
	Message "$PD_YELLOWK"
	RemoteMessage "$PD_YELLOWO"
	Mapcolor 255 255 0
}

Lock 229 Doom
{
	Any { BlueCard BlueSkull KeyBlue}
	Any { YellowCard YellowSkull KeyYellow Yellowskullkey}
	Any { RedCard RedSkull KeyGreen}
	Message "$PD_ALL3"
	RemoteMessage "$PD_ALL3O"
}

Lock 101 Doom
{
	BlueCard 
	BlueSkull
	YellowCard 
	YellowSkull
	Yellowskullkey
	RedCard 
	RedSkull
	Message "$PD_ALL6"
	RemoteMessage "$PD_ALL6O"
}

Share this post


Link to post
HXCpr0n said:

And Kappes, I checked that wad out and used that code


Ah, okay. The Mediafire file counter doesn't work then.

As to your map.
The LOCKDEFS gave the new key a tag 200.
Did you then link this tag to the door special ?

Share this post


Link to post
Kappes Buur said:

Ah, okay. The Mediafire file counter doesn't work then.

As to your map.
The LOCKDEFS gave the new key a tag 200.
Did you then link this tag to the door special ?


D'oh. I didn't even know that (facepalm). I thought it just makes the new key actor apply to those doors instead.

Hopefully it should work now :P Thanks a bunch, you guys are always a huge help

Share this post


Link to post

Do you want your key to be used only in your maps or as a generalised replacement for the yellow skull?

If it's just for your maps, then what Kappes Buur told you covers it. If you want it to be a generalised replacement that works in any map that has a yellow skull key, you'll have to do what I posted (or something like anyway - just in case I have the syntax wrong).

Share this post


Link to post
Enjay said:

Do you want your key to be used only in your maps or as a generalised replacement for the yellow skull?

If it's just for your maps, then what Kappes Buur told you covers it. If you want it to be a generalised replacement that works in any map that has a yellow skull key, you'll have to do what I posted (or something like anyway - just in case I have the syntax wrong).


It does work, and I only need it for my wad. I'm contributing a map to a megawad. I'm assuming it would be ok then to just attach lockdefs.

Share this post


Link to post

Well, your DECORATE code uses the "replaces" word. That means every time an original YellowSkull is used in a map, your one will appear instead. So, anyone using the yellow skull key in another map in the megawad will find your key appearing and will also need to use key 200 on their doors.

If only your map should have the altered key, give your key a new edit number and do not used the "replaces" word. Then you can place your key in your map using the new edit number and everyone else will still be able to use the old key.

e.g.

actor Yellowskullkey: yellowskull 12345
{
+floatbob
+nogravity
}
Where "12345" is whatever number you decide to use.

Share this post


Link to post
Enjay said:

Well, your DECORATE code uses the "replaces" word. That means every time an original YellowSkull is used in a map, your one will appear instead. So, anyone using the yellow skull key in another map in the megawad will find your key appearing and will also need to use key 200 on their doors.

If only your map should have the altered key, give your key a new edit number and do not used the "replaces" word. Then you can place your key in your map using the new edit number and everyone else will still be able to use the old key.

e.g.

actor Yellowskullkey: yellowskull 12345
{
+floatbob
+nogravity
}
Where "12345" is whatever number you decide to use.


Awesome. I'll do this then, thanks.

Edit: For some reason my map won't work now, I'm getting an error with the very first decorate script.

edit edit: Nevermind, it was something else that I did relating to the powerups. It's fine

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
×