Jump to content

Photo

Sandcrab Gohma Help

Autoghost

  • Please log in to reply
1 reply to this topic

#1 Jambu

Jambu

    Junior

  • Members
  • Pronouns:He / Him, They / Them

Posted 28 April 2024 - 10:55 AM

enum SandCrabAttributes {xstep, ystep};

ffc script SandCrabGohma{
	void run(int enemyID){
		npc SandCrab = Ghost_InitAutoGhost(this, enemyID);
		int moveclk;
		int fireclk; //fires every 64 frames
		while(true){
			if(Ghost_Dir == DIR_UP || Ghost_Dir == DIR_DOWN){
				SandCrab->Step = SandCrab->Attributes[ystep];
			}
			else{ 
				SandCrab->Step = SandCrab->Attributes[xstep];
			}
			moveclk=Ghost_ConstantWalk4(moveclk, SandCrab->Step, SandCrab->Rate, 0, 0);
			Ghost_Waitframe(this,SandCrab,true,true);
		}
	}
}

So I have no idea how to do the legs of my custom gohma boss or the eye part. I got the movement figured out thou. Any help would be appreciated.

ZScript is fun btw. I'm enjoying learning it. :)


Edited by Jambu, 28 April 2024 - 10:55 AM.


#2 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 28 April 2024 - 11:31 AM

To make it larger, you'll wanna use Ghost_Transform. The syntax is  Ghost_Transform(ffc this, npc ghost, int combo, int cset, int width, int height). So if you don't need to change the tiles, you could use  Ghost_Transform(this, ghost, -1, -1, 3, 1);. Now it'll be 3x1. To make the hitbox only the eye, you'll wanna use Ghost_SetHitOffsets(npc ghost, float top, float bottom, float left, float right). This will shrink the hitbox away from the edges by the amount you set. so Ghost_SetHitOffsets(ghost, 0, 0, 16, 16) would set the hitbox to only be the eye in the middle combo.


  • Jambu likes this



Also tagged with one or more of these keywords: Autoghost

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users