Page 1 of 1

Aiming Custom Projectiles ACS

Posted: Sat Aug 23, 2014 12:11 pm
by nambona890
So what I'm trying to do is fire a custom projectile at a player using SpawnProjectile, but I don't know how to get it to aim at the player each time. There might be a trick with angles that I do not know about, but I would like some help please.

RE: Aiming Custom Projectiles ACS

Posted: Sat Aug 23, 2014 3:23 pm
by Ænima

RE: Aiming Custom Projectiles ACS

Posted: Sat Aug 23, 2014 8:10 pm
by ZZYZX
Didn't he say CUSTOM projectiles? And Thing_ProjectileAimed in ZDoom prior to 2.7.1 requires a spawnid which can't be assigned to custom actors.

RE: Aiming Custom Projectiles ACS

Posted: Sat Aug 23, 2014 8:44 pm
by Ænima
Circunei Z wrote: Didn't he say CUSTOM projectiles? And Thing_ProjectileAimed in ZDoom prior to 2.7.1 requires a spawnid which can't be assigned to custom actors.
Whoops, my bad. Sorry. I've honestly never tried to spawn a custom projectile with that function. :p


You could always just spawn a custom invisible DECORATE actor that A_FaceTarget's the player and fires your projectile instantly.

RE: Aiming Custom Projectiles ACS

Posted: Sun Aug 24, 2014 2:28 am
by nambona890
Ænima wrote:
Circunei Z wrote: Didn't he say CUSTOM projectiles? And Thing_ProjectileAimed in ZDoom prior to 2.7.1 requires a spawnid which can't be assigned to custom actors.
Whoops, my bad. Sorry. I've honestly never tried to spawn a custom projectile with that function. :p


You could always just spawn a custom invisible DECORATE actor that A_FaceTarget's the player and fires your projectile instantly.
Ok, even though it's a bit tacky doing that, i'll try it.

RE: Aiming Custom Projectiles ACS

Posted: Sun Aug 24, 2014 4:51 am
by nambona890
http://puu.sh/b5sHZ/7c0fe6648a.wad Well I got it sort of done, here is the bare basis of it.

RE: Aiming Custom Projectiles ACS

Posted: Sun Aug 24, 2014 10:23 am
by ZzZombo
You can just give the player an CustomInventory that will launch the projectile:

Code: Select all

actor PlayerMissileHelper:CustomInventory
{
	States
	{
		Pickup:
		TNT1 A 0 A_CustomMissile/A_FireCustomMissile(your params)
		stop
	}
}
//ACS
script 3000 RESPAWN//correct it as you need.
{
	GiveInventory("PlayerMissileHelper",1);
}

RE: Aiming Custom Projectiles ACS

Posted: Sun Aug 24, 2014 10:51 am
by nambona890
ZzZombo wrote: You can just give the player an CustomInventory that will launch the projectile:

Code: Select all

actor PlayerMissileHelper:CustomInventory
{
	States
	{
		Pickup:
		TNT1 A 0 A_CustomMissile/A_FireCustomMissile(your params)
		stop
	}
}
//ACS
script 3000 RESPAWN//correct it as you need.
{
	GiveInventory("PlayerMissileHelper",1);
}
I was talking about have a missile fire at the player from a different source, but never mind, I got it done. It is on my latest terrywad called usewdept. Check it out when Ty puts it into newstuff.