seekermissile hits ground

Discuss all aspects related to modding Zandronum here.
Post Reply
Zom-B
New User
Posts: 14
Joined: Thu Mar 14, 2013 8:43 pm

seekermissile hits ground

#1

Post by Zom-B » Sun Jun 29, 2014 10:15 am

I'm trying to improve a monster with a seeker missile (cyber annihilator), but when it shoots the missile (even in original code), it's aimed down at the smaller player, and eventually hits the ground. When I jump or crouch, it properly adjusts vertical aim, but when I run it seems it's just going in a straight line (Vertically).

I tried passing the SMF_PRECISE flag to A_SeekerMissile, but it seems zandronum doesn't understand A_SeekerMissile with more than two parameters at all.

Is there any way to solve this, other than firing the missile from a lower vertical offset in A_CustomMissile?

Code: Select all

A_CustomMissile("MHomingMissile", 40, -23) // original is 40, I'd even like to increase it to 47 to match the sprite better

ACTOR MHomingMissile : Rocket
{
	SeeSound "monsters/annihilator/shoot"
	DeathSound "monsters/annihilator/hrlexp"
	+SEEKERMISSILE
	Height 8
	Radius 8
	Speed 18
	Damage 15
	States
	{
	Spawn:
		HMIS A 4 Bright A_SeekerMissile(12, 20)
		HMIS A 4 Bright
		HMIS A 2 Bright A_SeekerMissile(8, 15)
		HMIS A 2 Bright
		Goto Spawn+2
	Death:
		MISL B 8 Bright A_Explode(96, 96)
		MISL C 6 Bright
		MISL D 4 Bright
		Stop
	}
}
Last edited by Zom-B on Sun Jun 29, 2014 10:16 am, edited 1 time in total.

XutaWoo
Forum Regular
Posts: 113
Joined: Mon Jun 04, 2012 7:04 am

RE: seekermissile hits ground

#2

Post by XutaWoo » Sun Jun 29, 2014 10:36 pm

This is a bug that was in the version of ZDoom the current version of Zand is based on, iirc. It's been fixed, but I forget how long it took to fix and I have no idea how long it'll take to fix.

Same reason there's no flag parameter for A_SeekerMissile, except that's a feature that hasn't been added yet, not a bug.

Probably should toss bug on the tracker to see if you can get it fit into 2.0 if it isn't already fixed in that version.
[spoiler]Image[/spoiler]
Image

Zom-B
New User
Posts: 14
Joined: Thu Mar 14, 2013 8:43 pm

RE: seekermissile hits ground

#3

Post by Zom-B » Mon Jun 30, 2014 4:50 pm

I'm planning to release this mod in a week or two, so unless 2.0 comes out then with that bug fixed (which isn't the case now), it should be 1.2 compatible

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

RE: seekermissile hits ground

#4

Post by Konda » Wed Jul 02, 2014 12:41 pm

Zan 2.0 definitely won't come out in a week or two, so the only option lef is HAX!

What you basically want to do is check if the missile is too close to the ground, and then thrust it upwards if possible. IIRC if you thrust a projectile in any direction, it will keep going in that direction forever, but since this is a homing missile, there's a chance that the homing missile is going to negate the thrust once it calls A_SeekerMissile again. So you have to make the thrust strong enough to move the missile upwards until it calls A_SeekerMissile again and stops the thrusting. As a method for checking how close to the ground your projectile is, I suggest using ACS. IIRC there is an ACS function that checks the actor's height relative to the floor height of the sector the actor is currenly in. Try finding the function on zdoom wiki.

BTW, if the thrusting doesn't work, you can always teleport the projectile at a bigger height using the SetActorPosition ACS function.
Last edited by Konda on Wed Jul 02, 2014 1:26 pm, edited 1 time in total.

Code: Select all

<Synert> fuck
<Synert> plugged in my memory stick and got a bsod

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: seekermissile hits ground

#5

Post by Lollipop » Thu Jul 03, 2014 9:26 am

I think you are thinking about changing the objects velocity, not thrusting it, though I am not perfectly certain. IIRC, velocity changes are permanent until changed, while thrusts are similar to the effect caused by explosions, where a player for instance is thrusted away from the source of the explosion.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

User avatar
Frits
Forum Regular
Posts: 298
Joined: Fri Jun 01, 2012 9:04 pm

RE: seekermissile hits ground

#6

Post by Frits » Thu Jul 03, 2014 12:05 pm

using konda's method is going to really frustating in-game.
example:
cyber stands on a ledge and you stand close to the ledge so the missles hit the floor as the cyber tries to shoot you. ( a situation we've all been in i guess). Add some trust to make them magically go upward a bit so they'll go over the ledge and back down at you. That's op material there.
Unless that's what you are aiming for. ;)

Code: Select all

Mode #grandvoid -o Konar6 by Frits
<Konar6> the fuck
<Konar6> who made this IRC
<Konar6> how is this possible

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

RE: seekermissile hits ground

#7

Post by Konda » Thu Jul 03, 2014 12:13 pm

Lollipop wrote: I think you are thinking about changing the objects velocity, not thrusting it, though I am not perfectly certain. IIRC, velocity changes are permanent until changed, while thrusts are similar to the effect caused by explosions, where a player for instance is thrusted away from the source of the explosion.
The thrusting functions basically give you horizontal/vertical velocity. Players lose vertical velocity because of gravity and lose horizontal velocity when they come in contact with the ground. I am not sure if Zan has some built-in air resistance that can cause the players to lose horizontal velocity while flying, but I'm pretty sure none of these factors have an effect on projectiles unless specified.
Frits wrote: using konda's method is going to really frustating in-game.
example:
cyber stands on a ledge and you stand close to the ledge so the missles hit the floor as the cyber tries to shoot you. ( a situation we've all been in i guess). Add some trust to make them magically go upward a bit so they'll go over the ledge and back down at you. That's op material there.
Unless that's what you are aiming for. ;)
There are ways to go around that too, but it's even more hax. But let's get the first part done first. After that we can compare player's and projectile's heights and floor heights to determine whether they're on the same floor level, and if they are, then the projectile should "bounce off the floor", if not, then it should just die. But yeah, let's get the ground level detection and thrusting done first...
Last edited by Konda on Thu Jul 03, 2014 12:18 pm, edited 1 time in total.

Code: Select all

<Synert> fuck
<Synert> plugged in my memory stick and got a bsod

Post Reply