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

Weapon don't view

Recommended Posts

I made a decorate in SLADE but the weapon don't view! And I can't pick it up!
I made the sprite lumps SNIPA0, SNIPB0, SNIPC0, SNIPZ0 and aligned them!
I also made a ammo with SCLPA0 but it is invisible! I still can pick it up though.

actor SniperClip : Clip 6041
{
	Inventory.PickupMessage "You got a sniper clip."
	Inventory.Amount 5
	Inventory.MaxAmount 40
	Ammo.BackpackAmount 7
	Ammo.BackpackMaxAmount 80
	States
	{
	SPAWN:
		SCLP A -1
		Stop
	}
}

actor SniperRifle : Weapon 6042
{
	Weapon.AmmoGive 12
	Weapon.AmmoType SniperClip
	Weapon.AmmoUse 1
	Weapon.BobStyle Smooth
	Weapon.KickBack 50
	Weapon.SelectionOrder 5
	Weapon.SlotNumber 5
	Weapon.SlotPriority 1
	Weapon.UpSound "sniper/select"
	Inventory.PickupMessage "You got a Sniper Rifle!"
	States
	{
		Spawn:
			SNIP Z -1
			stop
		Ready:
			SNIP A 1 A_WeaponReady
			loop
		Deselect:
			SNIP A 1 A_Lower
			loop
		Select:
			SNIP A 1 A_Raise
			loop
		Fire:
			SNIP B 3 A_Light1
			SNIP C 2 A_FireBullets (1, 1, 1, 65)
			SNIP C 1 A_Light2
			SNIP C 2 A_PlaySound ("sniper/fire")
			SNIP B 4 A_Light0
			SNIP A 3 A_Refire
			goto Ready
	}
}

Share this post


Link to post

I didn't understood. Where is that code you posted? I simply put the image lumps in the WAD and then reference them in the decorate.

Share this post


Link to post
Gustavo6046 said:

I made a decorate in SLADE but the weapon don't view! And I can't pick it up!
I made the sprite lumps SNIPA0, SNIPB0, SNIPC0, SNIPZ0 and aligned them!
I also made a ammo with SCLPA0 but it is invisible! I still can pick it up though.

actor SniperClip : Clip 6041
{
	Inventory.PickupMessage "You got a sniper clip."
	Inventory.Amount 5
	Inventory.MaxAmount 40
	Ammo.BackpackAmount 7
	Ammo.BackpackMaxAmount 80
	States
	{
	SPAWN:
		SCLP A -1
		Stop
	}
}

actor SniperRifle : Weapon 6042
{
	Weapon.AmmoGive 12
	Weapon.AmmoType SniperClip
	Weapon.AmmoUse 1
	Weapon.BobStyle Smooth
	Weapon.KickBack 50
	Weapon.SelectionOrder 5
	Weapon.SlotNumber 5
	Weapon.SlotPriority 1
	Weapon.UpSound "sniper/select"
	Inventory.PickupMessage "You got a Sniper Rifle!"
	States
	{
		Spawn:
			SNIP Z -1
			stop
		Ready:
			SNIP A 1 A_WeaponReady
			loop
		Deselect:
			SNIP A 1 A_Lower
			loop
		Select:
			SNIP A 1 A_Raise
			loop
		Fire:
			SNIP B 3 A_Light1
			SNIP C 2 A_FireBullets (1, 1, 1, 65)
			SNIP C 1 A_Light2
			SNIP C 2 A_PlaySound ("sniper/fire")
			SNIP B 4 A_Light0
			SNIP A 3 A_Refire
			goto Ready
	}
}

I see no SpawnID in your actors.
Am i wrong ?

Share this post


Link to post

You aren't, but that's irrelevant.

SpawnID is only used for Thing_Spawn, which basically never used anymore due to better functions existing, and some Hexen functions. Actors are still fully functional and usable without a SpawnID; it just means that if you want to spawn them via scripting, you'll need to use Spawn or SpawnSpot instead.

Share this post


Link to post
Arctangent said:

You aren't, but that's irrelevant.

SpawnID is only used for Thing_Spawn, which basically never used anymore due to better functions existing, and some Hexen functions. Actors are still fully functional and usable without a SpawnID; it just means that if you want to spawn them via scripting, you'll need to use Spawn or SpawnSpot instead.

Well , someone told me if you want your actors to be dispalyed at Things mode of Doom builder + SLADE , you need SpawnID...

Share this post


Link to post
The Doommer said:

Well , someone told me if you want your actors to be dispalyed at Things mode of Doom builder + SLADE , you need SpawnID...

What is needed for that is a DoomEdNumber, not a SpawnID. Which these actors do have; it's the number after the actor declaration - or in layman's terms, the first line of the actor.

Share this post


Link to post

Only things that you want to manually place to the map as an initial part of it. Do you place projectiles manually to a map of yours, as in, placing them to a specific place in a map editor? If not (and I bet you don't, because projectiles are meant to be fired by monsters during the game), they indeed don't need an Editor number. And SpawnID also not.

Share this post


Link to post

Actually, there's merit to giving projectiles a SpawnID, at least if you're using Hexen's ACS for whatever reason. Indeed, the dart and other trap projectiles from Hexen have SpawnIDs so that they can be launches by said traps.

Share this post


Link to post

It's true that many original actors need them due to a very specific hardcoded behaviour of old action specials used in enemy logic. But from the point of view of a contemporary ZDoom modder who is defining his own new actors via DECORATE and has access to all flexible features that ZDoom offers, Spawn IDs are not important in this way at all. DECORATE has functions to spawn anything based on classname, which is a lot more convenient than using Spawn IDs, and also fully flexible and unrestricted by the range of allowed Spawn IDs.

Point is, Spawn IDs aren't really needed for newly defined actors. Almost whatever the modder wants to do, there is a way to do it without Spawn IDs. And I'm not even sure about the "almost" word - it's possible that actually everything that can be done with Spawn IDs can also be done without them and better.

Share this post


Link to post
scifista42 said:

It's true that many original actors need them due to a very specific hardcoded behaviour of old action specials used in enemy logic.

pshhhhhhhhhh they aren't used by other actors, except pots; they're used by ACS scripts - the darts and stuff are launched out of level geometry via scripts

The point still stands, though.

Share this post


Link to post

My mistake. I was under an impression that the original enemy behavior actions like for example A_TroopAttack (Imp's attack) would spawn projectiles based on their SpawnID. It turned out that I've confused it with Dehacked numbers, and those don't even matter in ZDoom at all. So, to correct my previous post, even most of original actors don't benefit from having SpawnIDs.

Also, zdoom wiki confirms that new actors basically don't need SpawnIDs, as they're obsoleted by better identifiers:

Note that new actors need not be assigned a spawn number to spawn them from an ACS script. Nearly every spawn function that takes a SpawnID has an equivalent function that uses the actor's name directly instead. This allows for the creation and usage of more than 255 actors without the possibility of conflicting SpawnIDs.

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
×