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

custom actor type for maps

Question

so i made a weapon, here is the code

 

ACTOR magnum : AWEP {
    Decal "BulletChip"
    Inventory.PickupMessage "idk what is a good pickupmessage"
    Weapon.AmmoUse 0
    Weapon.AmmoGive 0
    Weapon.AmmoType "none"
    Weapon.SelectionOrder 1
    Obituary "i also dont know what is good"
    
    
    States {
    
    Spawn:
    MGNT G -1
    STOP
    
    Select:
    MGNT A 1 A_RAISE
    loop
    
    Deselect:
    MGNT A 1 A_LOWER
    loop
    
    Ready:
    MGNT A 1 A_WEAPONREADY
    loop
    
    FIRE:
    MGNT A 0 
    MGNT BCDEF 4 A_FireBullets (5.5, 3, 1, 8, "BulletPuff")
    MGNT A 0 A_REFIRE("FireS")
    MGNT A 1
    goto Ready
    
    
    FireS:
    MGNT BCDEF 4 A_FireBullets (5.5, 3, 1, 8, "BulletPuff")
    MGNT A 0 A_REFIRE("FireS")
    goto Ready
    }
}

 

and i used AWEP for actor type

here is my AWEP code

actor AWEP : Weapon
{
  Weapon.BobStyle Inverse
  Weapon.BobSpeed 1.2
  +FORCEXYBILLBOARD
  +WEAPON.ALT_AMMO_OPTIONAL
  +WEAPON.NOALERT
  States
  {
  Spawn:
  Ready:
  Select:
  Deselect:
  Fire:
    NOPE A 0
    Stop
    }
}

when i go to place it on a map, a decoratefolder does not pop up when i go to place a thing
do i need to change level format or is is somthing else

Share this post


Link to post

15 answers to this question

Recommended Posts

  • 0
Quote

ACTOR magnum : AWEP {

 

What is this? I think you mean:

 

ACTOR magnum : Weapon {

Even then, it needs a DoomED number to be placed on the map.

Share this post


Link to post
  • 0
Just now, R4L said:

 

What is this? I think you mean:

 


ACTOR magnum : Weapon {

Even then, it needs a DoomED number to be placed on the map.

i saw some other wads usung their own actor type

Share this post


Link to post
  • 0
10 minutes ago, Tuckymonster said:

i saw some other wads usung their own actor type

 

Not like that you didn't. You can't use a sprite lump name (AWEP) as a class name, AFAIK.

 

When you make any weapon in DECORATE, it's always defined as, for example:

 

ACTOR MyShotgun : Weapon

Or, if you are replacing weapons:

ACTOR MyShotgun : Weapon Replaces Shotgun

If you want to place it in your maps, it needs a DoomED number:

ACTOR MyShotgun : Weapon 10000

Wild Weasel made really good tutorials for making weapons in DECORATE.

Share this post


Link to post
  • 0
1 minute ago, R4L said:

Not like that you didn't. You can't use a sprite lump name (AWEP) as a class name, AFAIK.

 

When you make any weapon in DECORATE, it's always defined as, for example:

 


ACTOR MyShotgun : Weapon

Or, if you are replacing weapons:


ACTOR MyShotgun : Weapon Replaces Shotgun

k

Share this post


Link to post
  • 0
11 minutes ago, R4L said:

 

Not like that you didn't. You can't use a sprite lump name (AWEP) as a class name, AFAIK.

 

When you make any weapon in DECORATE, it's always defined as, for example:

 


ACTOR MyShotgun : Weapon

Or, if you are replacing weapons:


ACTOR MyShotgun : Weapon Replaces Shotgun

Wild Weasel made really good tutorials for making weapons in DECORATE.

it still does not pop up

Share this post


Link to post
  • 0
14 minutes ago, Tuckymonster said:

it still does not pop up

 

Look at my post again:

 

Quote

 

If you want to place it in your maps, it needs a DoomED number:


ACTOR MyShotgun : Weapon 10000

 

 

 

 

The ZDoom wiki will be your friend, as well as weasel's tutorial I linked before. You could have answered your own question just by looking here.

Share this post


Link to post
  • 0
2 minutes ago, Payload4367 said:

You might have put in a number already in use by the iwad. Try a different number like the 10000 that R4L suggested.

 

k

Share this post


Link to post
  • 0

I put 10000 as an example. There's a predefined list of numbers you shouldn't use, but you won't know them unless you see them in GZDoomBuilder or look them up in the wiki. It's still good practice though, so you can organize things nicely and avoid conflicting with predefined actors.

Share this post


Link to post
  • 0

@R4L graf zahl said 

On 6/10/2019 at 6:05 PM, Graf Zahl said:

regardless of game, start at 15000.

is there any way i can make a actor without a number?

Share this post


Link to post
  • 0
4 hours ago, Tuckymonster said:

@R4L graf zahl said 

is there any way i can make a actor without a number?

I believe if you make an "Actor Replaces (Whatever doom actor)" you dont need an id. Dont quote me on that though. Kinda like this:

 

ACTOR TPistol : Pistol Replaces Pistol

 

However with this in mind whatever you replace it with cant be added back, so if you replaced a plasma pistol for the normal doom pistol that normal pistol cant come back. Also with this method you need to add in a player script in. Like this:

 

ACTOR WirePlayer : DoomPlayer
{
    Player.WeaponSlot 2, "WireRifle"
    Player.WeaponSlot 3, "WireShotgun"
    Player.WeaponSlot 4, "WireM16"
    Player.WeaponSlot 5, "WireFlamethrower"
    Player.WeaponSlot 6, "WireLasergun"
    Player.WeaponSlot 7, "WireHRC"
    Player.StartItem "WireRifle"
    Player.StartItem "Fist"
    Player.StartItem "Clip", 50
    DamageFactor "Explosive", 0.25
}

 

In this case, Xaser said that actor "WireRifle" was going to take up the pistol slot, as evident from Player.WeaponSlot2. Hopefully I explained this in a way that makes sense.

Share this post


Link to post
  • 0
19 hours ago, Tuckymonster said:

@R4L graf zahl said 

is there any way i can make a actor without a number?

 

Your main problem was that you couldn't place the actor in your maps because it didn't show up in the GZDoomBuilder menu, right?

 

Without a DoomED number, you won't be able to place it AFAIK.

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
×