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

Fire bullets from mapspot

Recommended Posts

I was wondering if it's possible to fire machinegun or pistol-shots from a mapspot with ACS.
I know there is a SpawnSpot function but since the pistolshots don't seem to use projectiles I have no idea how to fire it from a mapspot.
The mapspot doesn't have to aim at the player, just fire in one direction.
What I am trying to make is a room with a window and once the script is called a machinegun fires from the window.
Thanks in advance.

Share this post


Link to post

One thing you could do is to make a custom actor with DECORATE that fires how you want, and then disappears, and then put that in your map (or even spawn it with ACS).

Share this post


Link to post

I've been trying to use LineAttack but when I compile it I get an error that the function is used but not defined. Do I need to add any other library than zcommon?
I am using the latest version of doom builder 2 and I just copied the latest version of ACC to the compilers. I got it from http://devbuilds.drdteam.org/ACC/ and just copy/pasted it in the zdoom and skulltag folders in compilers.
The script:
#include "zcommon.acs"

script 2 (void)
{

LineAttack(7, 180, 0, 10);

}
I also tried it with LineAttack(7, 180, 0,10,"BulletPuff","None",32000);
What could be the problem?

Share this post


Link to post

Now the script compiles and I know the script runs, but nothing seems to happen when I trigger the script.
Script:
#include "zcommon.acs"
script 2 (void)
{
print(s:"runs");
LineAttack(7, 180, 0, 10);
delay(1);

}

The script get's executed because I can see the 'runs' message.
I put mapspots with TID 7 facing east.
The mapspots are 32 units above the floor.
Could it be because of zandronum? It is the latest version(1.2.2).

Share this post


Link to post
g4m3w0rm said:

Could it be because of zandronum? It is the latest version(1.2.2).

Yes, LineAttack was introduced in ZDoom 2.7.1 it seems, so Zan won't have it yet. Not sure about the 2.0 development version.

Share this post


Link to post

Looks like using zdoom gives me other problems.(certain things suddenly not spawning).
Even so the lineattack function shot straight ahead FROM the player so something still wasn't right.
I am going to keep using zandronum so I'll give the actor-thing a try.

Share this post


Link to post

I fixed the things not showing up problem, so maybe I should give LineAttack another chance. Now I am going to use gzdoom.
Right now I have put some mapspots at heigth 32 and with tag 7.
In the script I use: LineAttack(7, 0, 0, 10);
The script doesn't seem to care much about the tagnumber and the angle since it just shoots to the east from my position.
What am I doing wrong?

Share this post


Link to post

Apparently I had the fixed numbers wrong.
But I still have the problem that the attack comes from the player.
Script: LineAttack(7, 0.5, 0.0, 10);
The attacks always seem to come from the one who executes the script which is the linedef in this case.

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
×