The "How do I..." Thread

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Re: The "How do I..." Thread

Postby cortlong50 » Mon Nov 13, 2017 10:48 pm

how do i see what errors gzdoom builder is having when compiling zdoom ACS?

it says there is an error and there is a red exclamation next to "#include "zcommon.acs"" yet it seems to compile without a problem as the scripts end up working...super weird.

is there any way to see what the issue is? because right now its not showing any error.
i did have something popup asking if it could access a file though...but i cant seem to get it to come back. really weird.


im actually using Johnnyfives weather system (incredible) and haev never had issues. well now that im using GZDB when i go to compile it isnt a fan of compiling with the "#import "weather.acs"" underneath the include zcommon.acs.

the weather is in fact in the GZDB folder. not really sure waht teh issue could be.


EDIT

also for some reason GZDB wont allow me to compile the script
/////
script 15 open
{
PlaySound (39, "torture3",Chan_body, 1, true, 2.0, false);
}

why? do i need to update my zcommon.acs? if so where is the download...ive been looking FOREVER!
EDIT
if anyone is curious on how to update their zcommon.acs go to "https://zdoom.org/downloads"

updated my zcommon...and now it compules and no sound plays. seriously....why does nothing work all of a sudden?
User avatar
cortlong50
editing my comments ad nauseam
 
Joined: 24 Jun 2013
Location: UT-WA

Re: The "How do I..." Thread

Postby Clay » Wed Nov 15, 2017 5:47 am

Any way to use a textured 3d model as terrain?
User avatar
Clay
Join my model specific Dicord! https://discord.gg/hQD9Va
 
Joined: 22 Sep 2017
Location: That one secret you always miss.
Discord: SomeOtherDoomGuy#7217

Re: The "How do I..." Thread

Postby ramon.dexter » Wed Nov 15, 2017 7:33 am

SomeOtherDoomGuy wrote:Any way to use a textured 3d model as terrain?


It is possible. But keep in mind that collision for the model is calculated only as a box...
So I can imagine a textured 3d model of terrain used for scenery, or in places where player cannot enter. Otherwise, not.
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: The "How do I..." Thread

Postby Clay » Wed Nov 15, 2017 7:37 am

Well I was thinking of going with the use of MODELDEF instead. From what I understand, 3d models do not have collision. If that is true, then could I use a 3d map and build 'real' geometry around it giving that illusion of being in a 3d level?
User avatar
Clay
Join my model specific Dicord! https://discord.gg/hQD9Va
 
Joined: 22 Sep 2017
Location: That one secret you always miss.
Discord: SomeOtherDoomGuy#7217

Re: The "How do I..." Thread

Postby Apeirogon » Wed Nov 15, 2017 8:33 am

SomeOtherDoomGuy wrote:Well I was thinking of going with the use of MODELDEF instead. From what I understand, 3d models do not have collision. If that is true, then could I use a 3d map and build 'real' geometry around it giving that illusion of being in a 3d level?

You can add small actor_box at/in/near surface of model, to make illusion that model have corresponding it size hitbox, it but this take much, much time.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: The "How do I..." Thread

Postby MetallicaSepultura » Wed Nov 15, 2017 8:56 am

i'm trying to make a weapon which uses two kinds of ammo, and when you press reload it changes the ammo type.

Code: Select allExpand view
ACTOR 410BoreDerringer : Weapon
{
Weapon.AmmoType1 "410Bore"
Weapon.AmmoType2 "45Colt"
Weapon.AmmoGive 8
Weapon.AmmoUse1 2
Weapon.AmmoUse2 2
Weapon.KickBack 50
Decal BulletChip

+WEAPON.DONTBOB
Weapon.SlotNumber 2
tag "410Bore/45Colt Cobray Derringer"
Inventory.PickupSound "Misc/w_pkup"
Inventory.PickupMessage "Picked up the Scatter Gun!"
 States
    {
   410Bore:
   TNT1 AAAAA 0
      TNT1 A 0 A_Giveinventory("Has45Colt")
      TNT1 A 0 A_JumpIfInventory("Has410Bore", 0, "SwitchToColt45")
      TNT1 A 0 A_Print("410 Bore Shells Loaded")
      DERR A 10
        DERR C 1
      DERR D 1
      DERR E 1
      DERR F 15
      DERR F 1 A_LoadShotgun2
      DERR F 15
        DERR F 1 A_LoadShotgun2
      DERR F 15
      DERR F 1 A_CloseShotgun2
      DERR E 1
      DERR D 1
      DERR C 1
      Goto Ready
   SwitchToColt45:
      TNT1 A 0 A_Print("Colt 45 bullets Loaded")
      TNT1 A 0 A_Giveinventory("Has410Bore")
      DERR A 10
        DERR C 1
      DERR D 1
      DERR E 1
      DERR F 15
      DERR F 1 A_LoadShotgun2
      DERR F 15
        DERR F 1 A_LoadShotgun2
      DERR F 15
      DERR F 1 A_CloseShotgun2
      DERR E 1
      DERR D 1
      DERR C 1
      Goto Ready
      
    Spawn:
        GUNC A -1
        Loop
    Ready:
        DERR A 1 A_WeaponReady(WRF_ALLOWRELOAD)
        Loop
    Deselect:
        DERR A 1 A_Lower
        Loop
    Select:
        DERR A 1 A_Raise
        Loop
    Fire:
      TNT1 A 0 A_JumpIfInventory("Has410Bore", 1, "Fire410Bore")
      DERR A 0 A_GunFlash
      DERR B 0 A_FireBullets(3, 3, 2, 35, "MRPUFF", 1)
        DERR B 2 A_PlayWeaponSound("ANGSFIRE")
      DERR CBA 1
        DERR A 10
        DERR C 1
      DERR D 1
      DERR E 1
      DERR F 15
      NULL A 0 A_FireCustomMissile("CasingSpawner",1,0,2)
      NULL A 0 A_FireCustomMissile("CasingSpawner",1,0,2)
      DERR F 1 A_LoadShotgun2
      DERR F 15
        DERR F 1 A_LoadShotgun2
      DERR F 15
      DERR F 1 A_CloseShotgun2
      DERR E 1
      DERR D 1
      DERR C 1
        goto Ready
      
   Fire410Bore:
      DERR A 0 A_GunFlash
      DERR B 0 A_FireBullets(6, 6, 8, 15, "MRPUFF", 1)
        DERR B 2 A_PlayWeaponSound("ANGSFIRE")
      DERR CBA 1
        DERR A 10
        DERR C 1
      DERR D 1
      DERR E 1
      DERR F 15
      NULL A 0 A_FireCustomMissile("CasingSpawner",1,0,2)
      NULL A 0 A_FireCustomMissile("CasingSpawner",1,0,2)
      DERR F 1 A_LoadShotgun2
      DERR F 15
        DERR F 1 A_LoadShotgun2
      DERR F 15
      DERR F 1 A_CloseShotgun2
      DERR E 1
      DERR D 1
      DERR C 1
      Goto Ready
      Flash:
      DERR B 2 Bright A_Light1
      NULL B 2 A_Light2
      NULL B 1 A_Light0
      stop
      Reload:
      Goto 410Bore
}
}
actor 410Bore : Ammo
{
  Inventory.PickupMessage "410 Bore shells"
  Inventory.Amount 10
  Inventory.MaxAmount 200
  Inventory.Icon "AAMOA0"
  Ammo.BackpackAmount 10
  Ammo.BackpackMaxAmount 400
  states
  {
  Spawn:
    ZCLP A -1
    stop
  }
}
actor 45Colt : Ammo
{
  Inventory.PickupMessage "Colt 45 Bullets"
  Inventory.Amount 10
  Inventory.MaxAmount 200
  Inventory.Icon "AAMOA0"
  Ammo.BackpackAmount 10
  Ammo.BackpackMaxAmount 400
  states
  {
  Spawn:
    ZCLP A -1
    stop
  }
}
Actor Has410Bore : Inventory
{
Inventory.Amount 0
Inventory.MaxAmount 1
}
Actor Has45Colt : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
}


but anytime i try to change ammo, it always prints "410 bore shells loaded" but the attack it's still the colt45 one, also it still uses the same ammo, how can i change this behaviour? since i know that the code has errors, but i can't understand which ones.
User avatar
MetallicaSepultura
Taking the Angst, setting Revenge
 
Joined: 15 May 2016
Location: Futura City, currently slaughtering Rahzs

Re: The "How do I..." Thread

Postby Apeirogon » Thu Nov 16, 2017 11:37 am

How make enemy blind? More preciesely how make him walk and attack only at heared direction of sound? Purpose, make cacodemon, which have one BIG eye, with shootable eye.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: The "How do I..." Thread

Postby worldendDominator » Thu Nov 16, 2017 12:00 pm

MetallicaSepultura, what exactly are you trying to do in 3rd line after 410Bore label? The one with A_JumpIfInventory. Amount 0 means that it will jump if you have max amount of specified inventory item.
User avatar
worldendDominator
 
Joined: 17 May 2015

Re: The "How do I..." Thread

Postby SHayden » Thu Nov 16, 2017 2:27 pm

Quick question, how do i "bind" certain animation for certain type of attack. I'm doing something for myself but....
Let's put it this way, for example revenant has 2 attacks, melee and rocket. When it fires rocket we see his shoulder cannons firing rocket, and when he punches, we see him swinging his arm(logic, right?)
THIS is the problem I have, how do i separate "animations" for each attack I legit tried everything and I just can't bind 2 different animations to 2 different attacks(let's say i'm doing something similar to the example i just made)

Hope you guys understand what's the problem :blergh: :blergh: :blergh:
User avatar
SHayden
( ͡° ͜ʖ ͡°)
 
Joined: 28 Jan 2017
Location: Zagreb, Croatia, Europe, Earth, Milky way :P
Discord: SHayden#5626

Re: The "How do I..." Thread

Postby worldendDominator » Thu Nov 16, 2017 2:38 pm

You give the revenant Melee and Missile states with different sprites.
Or in case of a custom monster, you give it several attack states (melee or missile, it doesn't matter) with different sprites.
User avatar
worldendDominator
 
Joined: 17 May 2015

Re: The "How do I..." Thread

Postby SHayden » Thu Nov 16, 2017 2:40 pm

That doesn't help... I just said I tried everything but it gives me one of those animations for both attacks
User avatar
SHayden
( ͡° ͜ʖ ͡°)
 
Joined: 28 Jan 2017
Location: Zagreb, Croatia, Europe, Earth, Milky way :P
Discord: SHayden#5626

Re: The "How do I..." Thread

Postby worldendDominator » Thu Nov 16, 2017 2:46 pm

Let's say one animation uses sprites BLAH E, F and G, and other uses BLAH H, I, and J.
The respective states should be like this:
Code: Select allExpand view
Attack1:
    BLAH E 7
    BLAH F 7
    BLAH G 7 A_CustomMissile("BlahMissile")
    Goto See
Attack2:
    BLAH H 8
    BLAH I 8
    BLAH J 8 A_CustomBulletAttack(10,5,3,4)
    Goto See


If you still don't understand, post the actor code here (preferably under a spoiler if it's long).
User avatar
worldendDominator
 
Joined: 17 May 2015

Re: The "How do I..." Thread

Postby SHayden » Thu Nov 16, 2017 2:52 pm

I'm copying mod empathy since i'm fairly new to this so...mod is not mine...blah blah blah...
Spoiler:


I know there are lot of mistakes in here so don't laugh i'm still learning i'm complete noob for decorate :P
User avatar
SHayden
( ͡° ͜ʖ ͡°)
 
Joined: 28 Jan 2017
Location: Zagreb, Croatia, Europe, Earth, Milky way :P
Discord: SHayden#5626

Re: The "How do I..." Thread

Postby worldendDominator » Thu Nov 16, 2017 3:09 pm

You should've mentioned you're talking about a playerpawn and not a monster. That changes everything.
If you want main fire and altfire make the pawn do different animations, you need to distinguish them somehow in the pawn's Missile state. It should be possible to do with a token (inventory item without any properties), but there may be other ways.
Code: Select allExpand view
Actor DiabolistPlayer {
   ...
   Missile:
      TNT1 A 0 A_JumpIfInventory("RaiseToken",1,"MisRaise")
      DIAB G 10
      DIAB HIJKLMNO 8
      DIAB P 20
      Goto Spawn
   MisRaise:
      DIA2 ABC 10
      Goto Spawn
   ...
}

Actor DiabloistPower : Weapon {
   ...
   AltFire:
      DIAB A 0 A_JumpIfNoAmmo("Ready")
      DIAB A 0 A_GiveInventory("RaiseToken",1)
      ...
      DIAB A 0 A_TakeInventory("RaiseToken",1)
      DIAB A 10 A_ReFire
      Goto Ready
   ...
}

Actor RaiseToken : Inventory {
   Inventory.MaxAmount 1
}
User avatar
worldendDominator
 
Joined: 17 May 2015

PreviousNext

Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 3 guests