Project X Forums
http://px.worms2d.info/forum/

How to use Sprite
http://px.worms2d.info/forum/viewtopic.php?f=15&t=318
Page 1 of 2

Author:  WowwoW [ Wed Aug 31, 2011 5:49 pm ]
Post subject:  How to use Sprite

I have made a new weapon and i want to add my own sprite (i have all the png's)

How to use the pngs as new sprite of weapon

Author:  Zed [ Thu Sep 01, 2011 4:44 pm ]
Post subject:  Re: How to use Sprite

1st you need to add ur sprites in px lib\scheme. Then you can use sprite name to add the sprite to the weapon.
You can change the missile\trail sprite by replacing Sprite Number and Trail Sprite fields with a name of the sprite (Launch -> Animation).
You can change worm aiming\firing\picking sprites too, in the Custom Animation section.
Usually you need to replace aiming field to make your picking sprite workz (idk if the firing anim has that problem 2).

Attachments:
custom anim.png
custom anim.png [ 10.88 KiB | Viewed 11234 times ]

Author:  WowwoW [ Sat Sep 03, 2011 7:29 pm ]
Post subject:  Re: How to use Sprite

Zed wrote:
1st you need to add ur sprites in px lib\scheme.


How? Just opening PXLEdit.exe and adding all the png's with "add file" ??

Zed wrote:
You can change the missile\trail sprite by replacing Sprite Number and Trail Sprite fields with a name of the sprite (Launch -> Animation).


How do i know the number?


Quote:
You can change worm aiming\firing\picking sprites too, in the Custom Animation section.


Again (sorry for ma noobness) how do i know what to fill the cell with?



Also , how to change the Grid image?

Author:  Virtu [ Sat Sep 03, 2011 9:07 pm ]
Post subject:  Re: How to use Sprite

Add all your sprites with the 'Add file' button in the Library Editor.

Instead of putting a number in the 'Sprite Number' fields, just type the name of your sprite file and it's extension. (e.g.: mysprite.png)

Same goes for the Aiming/Picking/Firing fields, just fill in with your file names.

There's a field for grid imgs as well, when editing your weapon. Just be sure to include all your sprite files, adding them in the Library Editor ;)

For sprites with multiple frames, since each frame will be a square, arrange your frames vertically, making sure the sprite strip height is divisible by it's width, otherwise the game will crash. That way a 100x2000 image would have 20 frames, 100x100 pixels each.

Author:  WowwoW [ Sun Sep 04, 2011 12:44 am ]
Post subject:  Re: How to use Sprite

Virtu wrote:
Add all your sprites with the 'Add file' button in the Library Editor.


Ok ^^ done

Quote:
Instead of putting a number in the 'Sprite Number' fields, just type the name of your sprite file and it's extension. (e.g.: mysprite.png)


Ok now i understand lol

Quote:
For sprites with multiple frames, since each frame will be a square, arrange your frames vertically, making sure the sprite strip height is divisible by it's width, otherwise the game will crash. That way a 100x2000 image would have 20 frames, 100x100 pixels each.


Im making an special nade , and all the frames vertically are 29x841 so no crash

but the sprite works veeeery weirdly , sometimes i see 2 grenades instead of one

¿¿¿Do i have to change something at "animation Parameters"???

And which is the firing sprite?? , this one?? :

Attachment:
Algo.png
Algo.png [ 3.12 KiB | Viewed 11206 times ]


And , is there a way to edit firing/aiming/picking sprites faster? , i hate to have to edit all manually , very long =/ , any1 knows a photoshop clue? :D

thx for your answer Virtu :D

Author:  Zed [ Sun Sep 04, 2011 3:02 pm ]
Post subject:  Re: How to use Sprite

Quote:
but the sprite works veeeery weirdly , sometimes i see 2 grenades instead of one

If i understood correctly, this happens if ur grenade image is in two frames simultaneously.
Attachment:
missile-fail.png
missile-fail.png [ 5.12 KiB | Viewed 11198 times ]


Firing sprite for the grenade is this one:
http://img1.pixhost.org/images/2702/8863805_wthrow.png

Im editing them manually through Photoshop and i hate it too :D

Author:  WowwoW [ Mon Sep 05, 2011 12:13 am ]
Post subject:  Re: How to use Sprite

Zed wrote:
Firing sprite for the grenade is this one:
http://img1.pixhost.org/images/2702/8863805_wthrow.png


I guess this is for mines lol I finally think grenade doesnt have firing sprite (as steps told me)


All work now , the sprites , the bounciness ; all except the fire

I dont know why but i change the parameters and the grenade always explode in 5 flames -.- (ye , i call it FlameNade , i will post it with ma new scheme)

I want it to explode like petrolbomb , but a bit weaker.

thats all for now , thx for replies ^^

Author:  Zed [ Mon Sep 05, 2011 1:19 am ]
Post subject:  Re: How to use Sprite

Grenade do have firing sprite :\

Author:  WowwoW [ Mon Sep 05, 2011 1:44 pm ]
Post subject:  Re: How to use Sprite

Does it?

Well , maybe , but i think i dont need to edit it because firing sprite is the worm and his hand , the grenade doesnt appear on these sprite.

Any solution to my fire problem?

And , another question , how to modify the fire sound? The Sound button is always unavaliable to be clicked

Author:  StepS [ Mon Sep 05, 2011 7:56 pm ]
Post subject:  Re: How to use Sprite

Virtu wrote:
Instead of putting a number in the 'Sprite Number' fields, just type the name of your sprite file and it's extension. (e.g.: mysprite.png)

That's cool, but it doesn't work with the "throw"-type weapons :evil:
WowwoW wrote:
I dont know why but i change the parameters and the grenade always explode in 5 flames -.- (ye , i call it FlameNade , i will post it with ma new scheme)

did you turn off the WA scheme power tweak?
Zed wrote:
Grenade do have firing sprite :\

No. It's always the same (wthrow.spr + u/d)

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/