Jump to content

I need some help with zscript


OnionTaco22

Recommended Posts

I think I remember seeing on the ZDoom wiki that you can change already existing actors with zscript (or maybe decorate) although I forgot where it was and how you do it.

 

I would like to know if anyone may have the link to the page or could say how to do it. :)

Share this post


Link to post
9 hours ago, inkoalawetrust said:

I looked through and saw the replace thing in one of the examples which was what I was looking for. Thank you :)

 

edit:

 

I did some more testing with it and it doesn't seem to replace weapons that I start with. For example I am trying to make the pistol have an alt fire mode where it shoots a three round burst (which already works), however in order to get that pistol I have to spawn it via the command bar. Do you have to do something else to change the starting pistol?

Edited by OnionTaco22
Another small problem

Share this post


Link to post

You need to either create a new inherited player class like so:

Class MyPlayer : DoomPlayer

{

        Default

        {

               Player.StartItem "MyPistol";
               Player.StartItem "Clip", 75;

        }

}

 

and in MAPINFO

 

Gameinfo

{

       PlayerClasses = "MyPlayer" 

}

 

Or you can use a script/event handler that takes away the old weapon from player and gives him the new one when he enters the map.

Edited by Rifleman

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...