ZScript enemy with one direction only

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!)

ZScript enemy with one direction only

Postby Walter Nussletire » Thu Jun 23, 2022 9:42 am

Hi!

I'd like to script some enemys for a small Doom mod.
I already downloaded SLADE and used a simple enemy as an example but I can't figure out the logic behind the ZScript. (The whole thing with "See" and "Melee" and the corresponding sprites)

I want my enemy to use a single billboard sprite, no directional sprites needed for now.
Does anyone have a minimal example how to script the most basic monster possible?

Thanks!
Walter Nussletire
 

Re: ZScript enemy with one direction only

Postby ramon.dexter » Fri Jun 24, 2022 12:32 am

Its quite easy. Just define the sprites for the said enemy only with frames ending with 0. This way all frames will be with one direction only.
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: ZScript enemy with one direction only

Postby Cherno » Fri Jun 24, 2022 3:36 am

This explains how sprites work:

https://zdoom.org/wiki/Sprite

The Zombieman actor definiton:

https://zdoom.org/wiki/Classes:ZombieMan

How to use the replace keyword to make your custom monsters appear easily in your mod:

https://zdoom.org/wiki/DECORATE_format_specifications
User avatar
Cherno
 
Joined: 06 Dec 2016


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest