A_RotateSpikeball help...

Status
Not open for further replies.

Blade

Get a load of THIS!!
Sonic Team Junior
Ok, I've read the Wiki multiple times, and I stil don't get it. How do I get a spikeball to orbit around an enemy? I've tried multiple times, and it still won't work. Help?
 
Make the spikeball target the enemy, then call A_RotateSpikeball every tic from there on out. Basically, make the spikeball's first frame target the enemy, then have the second frame's duration set to 1 and have the second frame's NEXT equal to itself.

Code:
FRAME 1
NEXT = 2
ACTION A_FindTarget
VAR1 = [SOC number of the enemy]
VAR2 = 0

FRAME 2
DURATION = 1
NEXT = 2
ACTION A_RotateSpikeball
VAR1 = 0
VAR2 = 0
 
Or just let the enemy you want to be surrounded by the spikeball shoot the object once. It works because missiles have always the object targeted which shot them (to prevent the shooter from damage).


This will make spikeballs rotate around blue cralwas for example:
FRAME 1999
SPRITENUMBER = 2
SPRITESUBNUMBER = 0
DURATION = 3
NEXT = 53
ACTION A_FireShot
VAR1 = 103
VAR2 = 0

Thing 1
MAPTHINGNUM = 3004
SPAWNSTATE = 50
SPAWNHEALTH = 1
SEESTATE = 1999
SEESOUND = 0
REACTIONTIME = 32
ATTACKSOUND = 0
PAINSTATE = 0
PAINCHANCE = 200
PAINSOUND = 0
MELEESTATE = 0
MISSILESTATE = 0
DEATHSTATE = 603
DEATHSOUND = 22
XDEATHSTATE = 0
SPEED = 3
RADIUS = 1572864
HEIGHT = 2097152
MASS = 100
DAMAGE = 0
ACTIVESOUND = 0
RAISESTATE = 0
FLAGS = 16777221
 
FuriousFox said:
Make the spikeball target the enemy, then call A_RotateSpikeball every tic from there on out. Basically, make the spikeball's first frame target the enemy, then have the second frame's duration set to 1 and have the second frame's NEXT equal to itself.

Code:
FRAME 1
NEXT = 2
ACTION A_FindTarget
VAR1 = [SOC number of the enemy]
VAR2 = 0

FRAME 2
DURATION = 1
NEXT = 2
ACTION A_RotateSpikeball
VAR1 = 0
VAR2 = 0

Would a varation work for getting an invisible spike ball to hover/balance on top of a crawla?
 
A_RotateSpikeball rotates around the center of the object. So as long as you can't make a control object that ceeps hovering over the enemy, the answer is no, I think.
 
Glaber, to do that kind of thing, have the enemy A_FireShot an invisible object that has a speed of 0, and then have the invisible object A_CapeChase so that it's frozen over the Drillakilla.
 
Ok, I tried the way Morph said, and now a spike ball rotate around it. However, whenever I touch the robot, it shoots spikeballs out like mad, and when the robot dies, the spikeballs remain. I also want four spikeballs, not one, but I could most likely figure that out myself.
 
I did a bit of thinking, what if instead of using see state use the spawn state instead?
 
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top