Spawn Water Splash Waves when you run in water - Help needed

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Spawn Water Splash Waves when you run in water - Help needed

Post by Niphura »

So, i wanted to do an standalone splash waves effects from project brutality 3.0, the waves effect appears when you shoot the water and when you jump but it doesn't appear when you run around. i managed to do a .pk3 file with the necessary decorate, modeldef, acs, 3d models, etc. but when i want to test it. This error appears:

Code: Select all

Could not find script lump 'zcommon.acs'
i don't understand what is wrong, i know that when you start a script yo need to write that line (zcommon.acs)

Here is the file: http://www.mediafire.com/file/ycfp9jace ... r.pk3/file

The effect: https://s8.postimg.cc/55zublmxx/Screens ... 131947.png
Last edited by Niphura on Sun Aug 05, 2018 9:10 am, edited 1 time in total.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: Could not find script lump 'zcommon.acs'

Post by m8f »

Your DECORATE lump includes your ACS script:
#include "SRC/SPLASHES.txt"

It shouldn't do that. Right now GZDoom tries to read ACS source code as DECORATE source code.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Could not find script lump 'zcommon.acs'

Post by Niphura »

m8f wrote:Your DECORATE lump includes your ACS script:
#include "SRC/SPLASHES.txt"

It shouldn't do that. Right now GZDoom tries to read ACS source code as DECORATE source code.
Okay, i fixed it, but now this error appears: https://s8.postimg.cc/uhwkmdv6t/error.png and by the looks of it, it is caused because the class "is over water" and "watersplasherz" aren't defined, i looked everywhere in the files from project brutality 3.0 but I can not find those classes defined anywhere
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: Could not find script lump 'zcommon.acs'

Post by m8f »

They are in decorate/Effects/PUFF.dec and decorate/Gore/BLOODSPLASH.dec.

By the way, does Project Brutality allow reusing its code and assets?
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Could not find script lump 'zcommon.acs'

Post by Niphura »

m8f wrote:They are in decorate/Effects/PUFF.dec and decorate/Gore/BLOODSPLASH.dec.

By the way, does Project Brutality allow reusing its code and assets?
Don't know, either way, i will reuse the 3d model and the codes but i'm going to do my own sprites

EDIT: After fixing the errors, the effects still do not appear when i run around the water, i don't know how it is made and probably i will just leave it there.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Spawn Water Splash Waves when you run in water - Help ne

Post by Niphura »

Does anyone know how to spawn water waves when the player runs on water? or how does it work in project brutality? So far, the only thing that i managed to do is: animate the water, create the water waves by shooting the water or jumping in it. The only thing that is left is create water waves when you walk above the water, but i don't know how to do it, if someone can help, it will be in the credits.

UPDATED version of the water FX: http://www.mediafire.com/file/1ch9p1hhl ... r.pk3/file
User avatar
ramon.dexter
Posts: 1520
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Spawn Water Splash Waves when you run in water - Help ne

Post by ramon.dexter »

I think that terrain lump should do it.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Spawn Water Splash Waves when you run in water - Help ne

Post by Niphura »

ramon.dexter wrote:I think that terrain lump should do it.
Do you have any terrain lump to use as a model?
User avatar
ramon.dexter
Posts: 1520
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Spawn Water Splash Waves when you run in water - Help ne

Post by ramon.dexter »

niphura, looks like you really dont know what i am speaking about. So, open the zdoom wiki and learn how the terrain lump.is used.

https://zdoom.org/wiki/TERRAIN
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Spawn Water Splash Waves when you run in water - Help ne

Post by Niphura »

ramon.dexter wrote:niphura, looks like you really dont know what i am speaking about. So, open the zdoom wiki and learn how the terrain lump.is used.

https://zdoom.org/wiki/TERRAIN
Okay, I made this terrain definition

Code: Select all

//********** Splashes **********
splash 	water
{
 smallclass 	watersplashbasesmall
 smallclip		16
 smallsound	dssplash

 baseclass		watersplashbase2
 chunkclass	watersplash
 chunkxvelshift	8
 chunkyvelshift	8
 chunkzvelshift	8
 chunkbasezvel	2
 sound		water
 NoAlert
}
//********** Terrain **********
terrain	water
{
 splash 	water
 footclip	 6
 liquid
}

//Which flat does what

ifdoom
//Splash floors first
floor FWATER1 Water
floor FWATER2 Water
floor FWATER3 Water
floor FWATER4 Water
endif
I do not know if it's okay. from what I understand there is an ACS code to check what floor type the player is on. This code then gives the player an inventory item that makes the player jump to a particular state in its decorate code and in that state it spawns an splash actor appropriate for the floor type. but i don't have an idea on how the player decorate would look like...so far i made this:

Code: Select all

ACTOR FootStep
{
    Radius 10
    Height 10
    Speed 7
	Projectile
	-NOGRAVITY
	+MISSILE
    +NOTELEPORT
    +CLIENTSIDEONLY
    +MOVEWITHSECTOR
    +NOEXTREMEDEATH
    DamageType Trample
    Damage (random (2, 3))
	+NODAMAGETHRUST
	+BLOODLESSIMPACT 
	gravity 40
	mass 1000
    Obituary "%o was trampled by %k."
	States
		{
		Spawn:
			NULL A 2 
			NULL A 1 //A_Explode(10,4,0)
			stop
        Death:
            NULL A 1
			NULL A 1 //A_Explode(10,4,0)
            Stop
		Crash:
			NULL A 1 
			NULL A 1 //A_Explode(10,4,0)
			stop
         }
}

Actor Footstep5: FootStep
{
    Damage 0
    -CLIENTSIDEONLY
}

Actor Footstep6: FootStep
{
    Damage (random (2, 3))
    -CLIENTSIDEONLY
	States
		{
		Spawn:
			NULL A 2 
			NULL A 1 //A_Explode(10,4,0)
			stop
        Death:
            NULL A 1 
			NULL A 1 //A_Explode(10,4,0)
            Stop
		Crash:
			NULL A 1 
			NULL A 1 //A_Explode(10,4,0)
			stop
         }	
}

Actor Footstep8: FootStep
{
    Damage (random (1, 1))
	Mass 0
    -CLIENTSIDEONLY
}

Actor FootstepStrong: FootStep
{
Speed 0
Radius 16
Damage 15
    Damage (random (2, 3))
    -CLIENTSIDEONLY
	States
		{
		Spawn:
		Death:
		Crash:
			NULL A 1 
			TNT1 A 0 A_SpawnItem("LargeMassWaterImpact")
			NULL A 0 A_Explode(60,5,0)
			stop
         }
}

Actor IsPlayer : Inventory
{
inventory.maxamount 1
}

Actor IsJumping : Inventory
{
inventory.maxamount 1
}

Actor IsDown : Inventory
{
inventory.maxamount 1
}

//===========================================================================
//
// Player
//
//===========================================================================

ACTOR Doomer : PlayerPawn Replaces DoomPlayer
{
	Speed 1.0
	Health 100
	+SOLID
	+THRUGHOST
	Species "Marines"
    BloodType "Player_Blood"
	Player.ColorRange 112, 127
	//
	Player.JumpZ 7.4
	States
	{
    Spawn:
		MARN A 0
		MARN A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		MARN A 1
	StandStill:	
		MARN A 0
		MARN B 0 A_JumpIfInventory("GoSpecial", 1, "SpecialCheckerMoving")
		MARN D 0 A_JumpIf (momz > 0, "IsJumpin")
		MARN D 0 A_JumpIf (momz < 0, "IsJumpin")	
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		TNT1 A 0 //A_SpawnItemEx("FootStep8", 0, 0, 40, 0, 0)
        MARN D 3
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		MARN D 2
		MARN D 0 A_JumpIf (momZ > 0, "IsJumpin")
		MARN D 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
        MARN D 5
		MARN D 0 A_JumpIf (momZ > 0, "IsJumpin")
		MARN D 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
        MARN D 5
		MARN D 0 A_JumpIf (momZ > 0, "IsJumpin")
		MARN D 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		TNT1 A 0 //A_SpawnItemEx("FootStep8", 0, 0, 40, 0, 0)
        MARN E 5
		NULL E 0 A_JumpIf (momZ > 0, "IsJumpin")
		NULL E 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		MARN E 5
		NULL A 0 A_JumpIf (momZ > 0, "IsJumpin")
		NULL A 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		MARN E 5
		NULL A 0 A_JumpIf (momZ > 0, "IsJumpin")
		NULL A 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		TNT1 A 0 //A_SpawnItemEx("FootStep8", 0, 0, 40, 0, 0)
        MARN A 1
		Loop
	See:
		MARN A 0	
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		MARN A 4 A_SpawnItemEx("FootStep6", 0, 0, 40, 0, 0)
		MARN A 0 A_JumpIf (momZ > 0, "IsJumpin")
		MARN A 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		MARN B 4 
		MARN B 0 A_JumpIf (momZ > 0, "IsJumpin")
		MARN B 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		MARN C 4 
		MARN C 0 A_JumpIf (momZ > 0, "IsJumpin")
		MARN C 0 A_JumpIf (momZ < 0, "IsJumpin")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		MARN B 4 A_SpawnItemEx("FootStep6", 0, 0, 40, 0, 0)
		MARN B 0 A_JumpIf (momZ > 0, "IsJumpin")
		MARN B 0 A_JumpIf (momZ < 0, "IsJumpin")
		MARN A 0 A_SpawnItemEx("FootStep6", 0, 0, 40, 0, 0)
		Goto StandStill	
   IsJumpin:
        MARN A 3
		NULL A 0 A_JumpIf (momZ > 0, "InAir")
		NULL A 0 A_JumpIf (momZ < 0, "InAir")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")	
		Goto StandStill		
	InAir:
		MARJ A 1
		TNT1 A 0 A_JumpIf (momZ == 0, "Land")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")	
		Loop	
	Land:
		MARN A 0 A_SpawnItem("FootStepStrong")
		TNT1 A 0 A_JumpIfInventory("WaterSplasherz", 1, "WaterSplash")
		Goto StandStill		
	}
} 
But this doesn't work, i am missing something?
Post Reply

Return to “Scripting”