customrailgun

Need help with your project? Ask here.
brick
Posts: 11
Joined: Mon Aug 10, 2009 14:12

customrailgun

Post by brick »

before all, I am brick. I enjoy your work so much, it's realy incredible the mods for doom.

I am with some doubts with railgun. How Can I put the Y offset

ex:

a_customrailgun(damage, spawnoft_x"y", ...)

thank you
User avatar
Rachael
Developer
Developer
Posts: 3646
Joined: Sat May 13, 2006 10:30

Re: customrailgun

Post by Rachael »

This is not a feature suggestion. The topic has been moved.
brick
Posts: 11
Joined: Mon Aug 10, 2009 14:12

Re: customrailgun

Post by brick »

sorry, my inglish is not good
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: customrailgun

Post by Gez »

brick wrote:before all, I am brick. I enjoy your work so much, it's realy incredible the mods for doom.

I am with some doubts with railgun. How Can I put the Y offset

ex:

a_customrailgun(damage, spawnoft_x"y", ...)

thank you
That's a bit misleading, you do not set the X and Y offsets separately. Instead, you just specify the distance away from the center of the shooter. X and Y are then calculated by trigonometry from the shooter's angle and that distance.
brick
Posts: 11
Joined: Mon Aug 10, 2009 14:12

Re: customrailgun

Post by brick »

Gez wrote:That's a bit misleading, you do not set the X and Y offsets separately. Instead, you just specify the distance away from the center of the shooter. X and Y are then calculated by trigonometry from the shooter's angle and that distance.
ok, I found a way (difficult) to do a height.

Code: Select all

actor mekanos
{
...

States
{

Railgun:
	
	NUL2 IJKLM 4 A_FaceTarget
	NUL2 N 10 A_CustomMissile("RailgunSpawner", 57, 0)
	NUL2 OPQR 6
	
	Goto Decision

...

}

Actor RailgunSpawner
{
    Radius 4
    Height 4
    Speed 10
    Damage 0
    +RIPPER
    +DOOMBOUNCE
    PROJECTILE
    States
    {
    Spawn:
       NULL A 1
       NULL A 1 A_SpawnItem("RailMonster",1,0,0)
       Stop
    }
}

Actor RailMonster
{  
    MONSTER
    Radius 1
    Height 1
    Speed 0
    +NOGRAVITY
    +NOCLIP
	+FRIENDLY
    States
    {
    Spawn:
	 NULL A 0 A_UnSetShootable
       NULL A 0 A_Look
    See:
       NULL A 0 A_Chase
    Missile:
       NULL A 0 A_FaceTarget
       NULL A 0 A_CustomRailgun(random(5, 50),0,"blue","white",1,10,3)
       Stop
    }
}
the actor mekanos is null beacuse he is a model.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: customrailgun

Post by Gez »

brick wrote:
Gez wrote:That's a bit misleading, you do not set the X and Y offsets separately. Instead, you just specify the distance away from the center of the shooter. X and Y are then calculated by trigonometry from the shooter's angle and that distance.
ok, I found a way (difficult) to do a height.
Yeah, that's X and Y relative to the world (so, horizontal, the height is the Z axis), not relative to the screen.
brick
Posts: 11
Joined: Mon Aug 10, 2009 14:12

Re: customrailgun

Post by brick »

Gez wrote:
brick wrote:
Gez wrote:That's a bit misleading, you do not set the X and Y offsets separately. Instead, you just specify the distance away from the center of the shooter. X and Y are then calculated by trigonometry from the shooter's angle and that distance.
ok, I found a way (difficult) to do a height.
Yeah, that's X and Y relative to the world (so, horizontal, the height is the Z axis), not relative to the screen.
ok, my quake bfg I do the samething, but cant anyone do a new action to stay more easy, like this:

A_CustomRailgunEX(damage, "damagetype", spawnofs_xy, "spawn height", ringcolor, corecolor, flags, float max diff)

guy what is "float max diff"?
Post Reply

Return to “Editing Help”