Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Bauul

Blood drips using ACS

Question

I'm trying to create drips of blood falling from the ceiling using ACS (it's for a community wad that isn't allowing custom sprites or DECORATE).

 

I figured SpawnParticle might be the best way to go, but I'm having real trouble using it.  Other than making a particle appear (the black default one, at the 0,0 position) I can't get anything else to work.

 

So couple of questions:

1) Is SpawnParticle the most sensible way to generate droplets falling from the ceiling?  I had hoped to just use a red particle fountain but there seems to be no way to edit their direction or intensity.

 

2) If it is, could anyone give me advice on how to get it work?  I first of all tried to create a red particle that sits 32 map units up from the origin and slowly descends over the course of 2 seconds.

 

#include "zcommon.acs"

script 1 ENTER
{
	SpawnParticle("red",1,70,50,0,0,32,0,0,0.5,0,0.0,0,0);
}

This produced nothing, so I simplified it down to:

 

#include "zcommon.acs"

script 1 ENTER
{
	SpawnParticle("red",1,70,50,0,0,32);
}

I hoped to produce a single red particle suspended 32 map units up from the origin which lasts for two seconds.  Instead it produced a black particle sat on the floor that fades after one second.

 

Any idea what I'm doing wrong?

Edited by Bauul

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 1

According to the wiki, "color" should be an integer and "z" should be a fixed point number, so try this:

SpawnParticle(0xFF0000,1,70,50,0,0,32.0);

 

Share this post


Link to post
  • 0
47 minutes ago, scifista42 said:

According to the wiki, "color" should be an integer and "z" should be a fixed point number, so try this:


SpawnParticle(0xFF0000,1,70,50,0,0,32.0);

 

Thanks!  So when a hex color is an int it has to start with "0x"?  I was trying the usual "#".  And if the wiki states a value is a float it always needs the "." even if you're not using a decimal?

 

Thank you again!  One day I'll get my head around the nuances of ACS. :)

Share this post


Link to post
  • 0

Yes to both questions. 0x###### defines an hex number; and a float must have a dot so the parser can do some conversion, since ZDoom's floats are represented by integers.

Share this post


Link to post
  • 0
9 hours ago, Albertoni said:

since ZDoom's floats are represented by integers

Not ZDoom's, ACS's. You can use real floats in DECORATE or ZScript; but ACS can only use integer variables, so it uses fixed-point (not floating point) and strings are actually indices to a string table.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×