The "How do I..." Thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
cortlong50
Posts: 753
Joined: Mon Jun 24, 2013 7:12 pm
Location: UT-WA

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

Post by cortlong50 »

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
Clay
Posts: 190
Joined: Fri Sep 22, 2017 9:52 pm
Location: That one secret you always miss.
Contact:

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

Post by Clay »

Any way to use a textured 3d model as terrain?
User avatar
ramon.dexter
Posts: 1529
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

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

Post by ramon.dexter »

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
Clay
Posts: 190
Joined: Fri Sep 22, 2017 9:52 pm
Location: That one secret you always miss.
Contact:

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

Post by Clay »

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
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

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

Post by Apeirogon »

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.
User avatar
MetallicaSepultura
Posts: 178
Joined: Sun May 15, 2016 3:49 am
Location: Futura City, currently slaughtering Rahzs

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

Post by MetallicaSepultura »

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 all

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
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

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

Post by Apeirogon »

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.
User avatar
worldendDominator
Posts: 288
Joined: Sun May 17, 2015 9:39 am

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

Post by worldendDominator »

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
SHayden
Posts: 176
Joined: Sat Jan 28, 2017 11:03 am
Location: Europe

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

Post by SHayden »

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
worldendDominator
Posts: 288
Joined: Sun May 17, 2015 9:39 am

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

Post by worldendDominator »

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
SHayden
Posts: 176
Joined: Sat Jan 28, 2017 11:03 am
Location: Europe

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

Post by SHayden »

That doesn't help... I just said I tried everything but it gives me one of those animations for both attacks
User avatar
worldendDominator
Posts: 288
Joined: Sun May 17, 2015 9:39 am

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

Post by worldendDominator »

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 all

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
SHayden
Posts: 176
Joined: Sat Jan 28, 2017 11:03 am
Location: Europe

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

Post by SHayden »

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
worldendDominator
Posts: 288
Joined: Sun May 17, 2015 9:39 am

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

Post by worldendDominator »

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 all

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
}
Locked

Return to “Editing (Archive)”