Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Nanami

ZDoom scripting help

Recommended Posts

Okay, if you ask for ZDoom help in #ZDoom they tell you to go to the forums. If you ask here, you get directed to the ZDoom forums. And if you ask there, nobody answers you. Well whatever, I'm asking here. Maybe somebody can help me.

I have a script that gives the character the Boots of Speed. I need a way of activating the item so the player doesn't have the option. I want them, in other words, to activate on pickup.

Also, since the powerup lasts way too long I need a way to deactivate after about 30 seconds (the delay is the easy part, the deactivate I don't know) and then get rid of it.

Any and all help is appreciated.

Share this post


Link to post

well the problem is that the behavior of the boots is hard coded in. they're an inventory item, even in doom mode. the thing with the doom inventory is that it's invisible (so you don't know you have it) and there's no way to activate stuff outside the player activating it (as with hexen). Getting rid of them is simple enough, I assume you can steal them with TakeInventory() (Enjay can verify the validity of that I'm sure) it's just the activating them that could pose a problem. Perhaps telling the player they now have the boots (and to press whatever is bound to activate inventory) and that they will lose them in 30 seconds regardless of if they use them or not. shrug

Share this post


Link to post
Nanami said:

Okay, if you ask for ZDoom help in #ZDoom they tell you to go to the forums. If you ask here, you get directed to the ZDoom forums. And if you ask there, nobody answers you. Well whatever, I'm asking here. Maybe somebody can help me.

Ouch, that's a touch unfair seeing as how the thread on the Zdoom forum ( http://notgod.com/phorum/read.php?f=12&i=5945&t=5945 ) is one of the longer ones over there, has included numerous on topic suggestions and even an example file for you to download. It's only a few short hours since you asked your last question there. I for one was in bed most of that time.

Could it be,

a) people don't visit there as often as here, and less people visit anyway, so there are less people to give answers,

b) what you want to do is hard and obscure and a lot of people don't know how to do it (perhaps they should post saying "dunno")

c) people have got better things to do than sit waiting for you to post a question and then answer it immediately just so that you can get your mod done

d) none of the above

e) all of the above (except d)

Edit: Oh, and I am unable to check due to some ongoing computer problems, but I think UltimateDoomer is correct. "Stealing" an activated item will not deactivate it. My guess is that once you use it, it becomes active and effectively leaves your inventory so cannot be taken.

Did you try and see if my APROP_Speed suggestion can work on the player? I suspect not, but if it does, then you could use that via a script and simply put a delay in the script for the effect duration.

Edit2: Come on Nanami, it's almost 20 minutes since I first posted. Why aren't you answering my posts dammit. :-P

Share this post


Link to post
Enjay said:

Edit2: Come on Nanami, it's almost 20 minutes since I first posted. Why aren't you answering my posts dammit. :-P


for one, she's asleep... :P

Share this post


Link to post
Enjay said:

Did you try and see if my APROP_Speed suggestion can work on the player? I suspect not, but if it does, then you could use that via a script and simply put a delay in the script for the effect duration.


I wish it was that easy but it's not.

SetPlayerProperty (playertoeffect, onorof, property)
Player properties are:
#define PROP_FROZEN.....................0
#define PROP_NOTARGET...................1
#define PROP_INSTANTWEAPONSWITCH........2
#define PROP_FLY........................3
#define PROP_TOTALLYFROZEN..............4

SetActorProperty (tid, property, value)
Actor properties are:
#define APROP_Health............0
#define APROP_Speed.............1
#define APROP_Damage............2
#define APROP_Alpha.............3
#define APROP_RenderStyle.......4
#define APROP_SeeSound..........5
#define APROP_AttackSound.......6
#define APROP_PainSound.........7
#define APROP_DeathSound........8
#define APROP_ActiveSound.......9

As you can see, completely different.

And forgive me being so impatient, but when the thread was first posted it got replies very quickly but then nobody seemed to want to try and answer the others. It may be impossible, but I'm going to work until I figure out if it is or not. Anyway, I'd been coding for about a day and a half and I wasn't in a very good mood. -_-

(EDIT: Dumb font not being lined up)

Share this post


Link to post

OK, so it seems actor and player properties are not transferable. I didn't think they would be, but worth looking at as a remote possibility. Now we know.

I think I'm all out of ideas now. You've essentially got a turbo item but it lasts too long. In a race I can see how that would probably confer too much of an advantage but I can't think of a way to shorten the effect.

As an alternative, how about speed pads? My kids have got the PSX rug rats games (I know, I know) and there are a couple of racing games within the main game. They have these flashing arrows on the ground that are slightly awkward to get on (ie slightly off the racing line) but there are a few of them dotted around the track. They speed you up briefly, and therefore give you a slight advantage, but if you make an effort to drive/run over more of them, you get a bigger overall effect simply because you have been boosted more often. You could maybe do something similar by thrusting the player, or using a fast scrolling floor. Heh, you could even teleport them a few feet forward. Possibilities?

Nanami said:

And forgive me being so impatient...


Forgotten about. I know its frustrating when you want to get things done and can't find out how. It just seemed ironic that the thread you were asking in happened to be one of the most active on the forum and people had been trying to help.

Share this post


Link to post

Yes, the speed pads are going to be in some levels, but we wanted one of our powerups to be a temporary speed up, like the mushrooms in Mario Kart. Yeah there's floor pads that speed you up but there's mushrooms that do the same, and that's a powerup.

Anyway it doesn't seem like we can do it. Seems a losing battle. We want the item to activate on its own (otherwise it would be the ONLY item in the game you have to activate) and not last so long. Even on a larger course I made, it lasts nearly two laps.

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
Sign in to follow this  
×