Jump to content
  • 0

Sprite ++y direct when equiped mount. Pet random moving? (Paperdoll random moving x y)


nvh
 Share

Question

MOUNT

if (MyEquipment[13] > -1) //13 is pet slot.
{          

           Sprite.Y += 10;                
          Paperdoll[0 to 11].diectY +=10; //sprite adding a mount will make the player taller                              
}

else

{

           Sprite.Y -= 10;                
          Paperdoll[0 to 11].diectY -=10; //remove mount

}               

----------------------------------------------------------------------------------------

PET

I came up with an idea that was to create a paperdoll (pet sprite), edit the client source and make it move randomly and follow the character.

if (player.y -- )

{ pet.y --}

 

if (player.x-- )

{ pet.x --}

 

update ()

{

if (random == 1) {pet.x++}

if (random == 2) {pet.y++}

if (random == 3) {pet.x--}

if (random == 3) {pet.y--}

if (player.x + pet.x > 10m) {pet.y--}

}

 

if (player.x + pet.x > 10m)

{ spawnpet(player.x - 2)

 

it doesn't seem easy but i want a challenge

I think code in here https://github.com/AscensionGameDev/Intersect-Engine/blob/main/Intersect.Client/Entities/Entity.cs

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
On 10/12/2021 at 7:32 PM, Cheshire said:

Personally, I would try and look into extending the Critter class to make them follow a different entity to create pets.

Probably makes them a little more dynamic than a silly picture being rendered at an offset.

How to u make sprites and paperdolls is taller, I want add mount

Link to comment
Share on other sites

  • 0

If you make all sprites and paperdoll bigger they'll have more space. But that's probably not what you want to do.

 

You'd probably need to render the player character at an offset compared to the mount sprite. So move it up on the screen by x pixels. 

Link to comment
Share on other sites

  • 0
32 minutes ago, Cheshire said:

If you make all sprites and paperdoll bigger they'll have more space. But that's probably not what you want to do.

 

You'd probably need to render the player character at an offset compared to the mount sprite. So move it up on the screen by x pixels. 

Can I edit source in client? I think in source have X and Y when render sprite and paperdolls.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...