Page 1 of 1

Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 3:21 am
by Isaacjedi5
I'm new to the forums, and I'm working on a Last Man Standing wad for Doom 2 based off of the The Hunger Games. But whenever i try to test it, I get this error:
[spoiler]
Execution could not continue.

Script error, "HGPublicBeta_1.wad:DECORATE" line 3:
Unexpected 'You got the bow.' in definition of 'NewWeapon'
[/spoiler]
:cry:
Can someone tell me what's wrong? I'm a Decorate noob.

[spoiler]
actor NewWeapon : HungerGamesBow
{
Inventory.PickupMessage "You got the bow."
weapon.ammogive1 15
weapon.ammotype1 "Arrows"
weapon.ammotype2 "FireArrows"
weapon.ammouse1 1
weapon.selectionorder 10000
Obituary "%k got %o right between the eyes with his bow."
states
{
Select:
ABOW A 1 A_Raise
loop
Deselect:
ABOW A 1 A_Lower
loop
Fire:
ABOW B 3
ABOW C 6
ABOW D 1 A_FireCustomMissile ("HungerGamesArrow", 5, 1, 8, 8, 0)
ABOW EF 3
Goto Ready
AltFire:
ABOW B 3
ABOW C 6
ABOW D 1 A_FireCustomMissile ("HungerGamesFireArrow", 5, 1, 8, 8, 0)
ABOW EF 3
Spawn:
BOWS A -1
stop
}
}
actor NewProjectile : HungerGamesArrow
{
radius 1
height 1
damage 70
speed 10
seesound "DSBOWFI"
deathsound "DSBOWHI"
PROJECTILE
states
{
Spawn:
ARR A 4
loop
Death:
ARR A 6
stop
}
}
actor NewMonster : FireTree
{
health 100
radius 20
height 56
mass 100
speed 8
MONSTER
+AMBUSH
+NODAMAGE
+NOPAIN
states
{
Spawn:
TREE A 10 A_Look
loop
See:
TREE A 2 A_Chase (CHF_DONTMOVE)
loop
//Melee:
//Missile:
A_CustomMissile (FireBall)
}
}
actor NewProjectile : FireBall
{
radius 6
height 8
damage 90
speed 10
seesound "DSFIRESHT"
deathsound "DSFIRXPL"
PROJECTILE
states
{
BAL1 AB 4 bright
loop
Death:
BAL1 CDE 6 bright
stop
}
}
actor NewWeapon : Mace
{
Inventory.PickupMessage "You got the mace."
weapon.ammogive1 0
weapon.ammotype1 ""
weapon.ammouse1 1
weapon.selectionorder 400
Obituary "%o got %p face beaten in by %k's mace."
states
{
Select:
MACE D 5 A_Raise
MACE A 1
loop
Deselect:
MACE A 1
MACE D 5 A_Lower
loop
Fire:
MACE BCD 6
MACE E 2 A_CustomPunch (70)
MACE F 2
Goto Ready
Spawn:
MACS A -1
stop
}
}
actor NewWeapon : Knife
{
Inventory.PickupMessage "You got the knife."
weapon.ammogive1
weapon.ammotype1
weapon.ammouse1 1
weapon.selectionorder 400
Obituary "%o was sliced and diced by %k's Knife."
states
{
Select:
KNIF A 1 A_Raise
loop
Deselect:
KNIF A 1 A_Lower
loop
Fire:
KNIF B 2
KNIF C 1 A_CustomPunch (90)
KNIF D 2 A_ReFire
Goto Ready
Spawn:
KNIS A -1
stop
}
}
actor Tribute : PlayerPawn
{
Health 100
Radius 16
Height 56
Player.AttackZOffset 8
Player.JumpZ 8
Player.ViewHeight 41
Player.ForwardMove 1.1
Player.SideMove 1.1
Player.ColorRange 112, 127
Player.SoundClass "player"
Player.DisplayName "Tribute"
Player.StartItem "Fist"
States
{
Spawn:
PEAS A -1
Loop
See:
PEAS ABCD 4
Loop
Missile:
PEAS EF 12
Goto Spawn
Melee:
PLAY EF 12
Goto Missile
Pain:
PEAS O 4
PEAS O 4 A_Pain
Goto Spawn
Death:
PEAS GH 10
PEAS I 10 A_PlayerScream
PEAS J 10 A_NoBlocking
PEAS KLM 10
PEAS N 1
PEAS N 1 A_PlaySound (DSCANNON)
PEAS N -1
Burn:
BURN A 1 A_PlaySound (DSBURNME)
BURN BCDEFGHIJKLMNOPQRSTUV 140
BURN V 1 A_PlaySound (DSCANNON)
BURN V -1
{
{
actor HungerGamesFireArrow
{
radius 1
height 1
damage 500
damagetype Fire
speed 10
deathsound "DSBOWHI1"
PROJECTILE
states
}
Spawn:
BAL1 AB 4 bright
loop
Death:
BAL1 CDE 6 bright
stop
}
}
}
[/spoiler]

RE: Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 3:55 am
by Combinebobnt
That's because from all the code you pasted, the actor HungerGamesBow doesn't exist, so NewWeapon is inheriting from something that doesn't exist, and NewWeapon doesn't inherit from a weapon, so it won't allow you to use the inventory properties on that actor, which is causing the crash.

RE: Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 3:55 am
by BloodyAcid
If you're using inheritance in your NewWeapon, make sure HunerGamesBow is defined as a weapon.

Edit: Ninja'd.

RE: Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 4:02 am
by Devonizer
All of these actors will break, you have them defined wrong, it should be Weapname : Inheriting actor(Doomweapon/weapon or something else), sounds cannot be lump names, you must define them in the sndinfo lump as a directory( DSSHOT Weapons/Shot) and then in a_playsound you would use the directory surrounded by quotes.(so A_Playsound("Weapons/Shot") ).

None of your weapons have ready states, player death has no stop at the end. I also noticed 3 braces at the bottom of the code, that will probably break something. ammotype is defined incorrectly in most of the weapons, you do not need ammotype1 if there is only a single ammotype, just use ammotype "" or ammotype "none". the trees will break, because they have no melee or missile states to jump to after a_chase.

RE: Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 4:54 am
by Llewellyn
A couple of sugestions, one, don't write a lot of code then try and test it, do it one thing at a time and check each one. You should also learn about the basic format of Decorate before making actors because you're liable to make mistakes. A good way to learn is to take an existing actor and modify it.
Ane just if the previous posts were confusing, the format for defining an actor is

Code: Select all

actor <Name>: <Inheriting actor> replaces <actor name to replace> <DoomEdNumber>
<Name> is the name of your actor, like HungerGamesArrow
<Inheriting actor> is an actor that your actor will copy, so if you inherited from a rocket, it would use any of its properties that you didn't re-define in your actor.
Replaces <actor name> tells the game what actor should be replaced by this actor.
The <DoomEdNumber> is the number you would define if you wanted to place the actor in a map using a map editor.
None of the things after the <Name> of an actor are required, and are each independantly not required, meaning you cab have one, two, all or none of those.
Here is an example of one:

Code: Select all

actor coolRocket : Rocket replaces Rocket 17163
It makes an actor named coolRocket that inherits from rocket and copys its properties then replaces all rockets, as well as letting you place them in the map using the number 17163.

RE: Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 4:07 pm
by Isaacjedi5
:eek: I made more mistakes then I thought.
But now I keep getting this error:
[spoiler]
Execution could not continue.

Script error, "HGPublicBeta_1.wad:DECORATE" line 72:
Sprite names must be exactly 4 characters
[/spoiler]
Line 72 is during my "FireTree" definition, but the sprite name is TREE, which is obviously four letters. Can someone help me?
[spoiler]

actor FireTree : CeilingTurret 1987
{
health 100
radius 20
height 56
mass 100
speed 8
MONSTER
+AMBUSH
+NODAMAGE
+NOPAIN
states
{
Spawn:
TREE A 10 A_Look
loop
See:
TREE A 2 A_Chase [(Melee[Missle[CHF_DONTMOVE]])]
loop
/Missile:
A_CustomMissile (FireBall)
}
}
actor FireBall : DoomImpBall
{
radius 6
height 8
damage 90
speed 10
seesound "DSFIRESHT"
deathsound "DSFIRXPL"
PROJECTILE
states
{
BAL1 AB 4 bright
loop
Death:
BAL1 CDE 6 bright
stop
}
}
[/spoiler]

RE: Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 4:12 pm
by BloodyAcid
Hopefully I'm on the right track, but I don't see any sprites for your Missile state. Also, specifically which line is "72"?

RE: Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 4:39 pm
by Isaacjedi5
I didn't notice the missile state, thanks.
But line 72 is the See state, and still doesn't work.

RE: Need help with Decorate, first wad

Posted: Fri Aug 10, 2012 11:22 pm
by Llewellyn
Try this:

Code: Select all

Spawn:
TREE A 10 A_Look 
loop
See:
TREE A 2 A_Chase ("Melee", "Missile", CHF_DONTMOVE)
loop
Missile: 
TREE A_CustomMissile ("FireBall") 
} 
} 
The brackets in Decorate action functions mean that they are not required, but you DON'T put them in your functions...

RE: Need help with Decorate, first wad

Posted: Sat Aug 11, 2012 12:44 am
by Isaacjedi5
All code works! But nothing appears in game. :cry:
There were no errors, so what happened?

RE: Need help with Decorate, first wad

Posted: Sat Aug 11, 2012 2:15 am
by Llewellyn
Isaacjedi5 wrote: All code works! But nothing appears in game. :cry:
There were no errors, so what happened?
If the sprites TREE or whatever don't actually exist the item will never spawn.

RE: Need help with Decorate, first wad

Posted: Mon Aug 13, 2012 4:39 pm
by Lollipop
make sure all images is within the S_START and S_END markers, just make new entries and call them that, they will work that way and put them like this:

S_START
TREEA0 (and the others go here)
S_END

now it should work ;)

RE: Need help with Decorate, first wad

Posted: Mon Aug 13, 2012 4:41 pm
by Ijon Tichy
unless of course you're using a pk3 (and since this is zdoom-specific, you really should), then you put the sprites in sprites/

RE: Need help with Decorate, first wad

Posted: Mon Aug 13, 2012 4:43 pm
by Lollipop
just make a folder called sprites? Thats quite usefull, if i could figure out having multiple actors in same decorate file...