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

Modify mole weapon
http://px.worms2d.info/forum/viewtopic.php?f=13&t=2081
Page 1 of 2

Author:  Resurrection [ Fri Jul 22, 2016 4:40 pm ]
Post subject:  Modify mole weapon

Are all object properties hidden in source code?
Is it possible to make a library that overrides the mole weapon and makes it so you can control it with arrow keys?
It moves in a parabola and if the k variable was found it would be easy to modify it..

How do you pro's know what every function and variable is called in the game?

Author:  Zed [ Sat Jul 23, 2016 11:32 pm ]
Post subject:  Re: Modify mole weapon

https://www.youtube.com/watch?v=63rClYhvHWQ&feature=youtu.be

You meant control while digging, but nonetheless. Also I discovered that the mole turns into some other object (with no name) when it starts digging. It's probably still possible though.

On how people know what does what, I asked Entuser when he was around, and experimented with px.

edit: after messing with it a bit more I managed to change Mole's direction while he is in the air (after pressing space a second time), but once he starts digging his position remains unchangeable - which means to control mole while he is digging you need to code everything that happens after you press space a second time (or entuser has to update px).

https://www.youtube.com/watch?v=5z6M5K4 ... e=youtu.be

Author:  Zed [ Sun Jul 24, 2016 2:24 pm ]
Post subject:  Re: Modify mole weapon

Here is the lib. I've made it less op, it can now go upwards only for about a second, it also accelerates half as fast.

Attachments:
File comment: test it
magicmole.zip [1.14 KiB]
Downloaded 965 times

Author:  Resurrection [ Tue Jul 26, 2016 5:12 pm ]
Post subject:  Re: Modify mole weapon

Did not expect a response. Happily surprised I am.

I will take a look at your modified mole now.

Edit: also added u as Steam friend :3

Author:  Zed [ Wed Jul 27, 2016 4:01 pm ]
Post subject:  Re: Modify mole weapon

Quote:
Edit: also added u as Steam friend :3

You are Phinxy?

Author:  Curtis [ Thu Jul 28, 2016 11:09 pm ]
Post subject:  Re: Modify mole weapon

amazing wep Zed....I love it.....I put a super sheep cape on it but the diving animation being only one sprite makes it look kinda static when flying around.....would it be possible to make the diving sprite 2-3 animated frames.....I noticed randomness actually affects the mole when flying around too...very nice....

Author:  Zed [ Fri Jul 29, 2016 4:58 am ]
Post subject:  Re: Modify mole weapon

thx, it's possible, but I've never animated projectile sprites, so it is too much work for me =)

Author:  Resurrection [ Sun Jul 31, 2016 5:02 pm ]
Post subject:  Re: Modify mole weapon

Yeah Phinxy is me. Not my real face on avatar.
Would be easier to control mole with only left and right keys.
Animations? Maybe cape animation is enough. Maybe possible to attach cape sprite on top of mole. Particles could be nice. I'm gonna try add these features so i can include it in my mole fort scheme.

Author:  Resurrection [ Sun Jul 31, 2016 7:01 pm ]
Post subject:  Re: Modify mole weapon

How do i edit .spr animation sprites? Easy to extract but no way to edit and save them again.ยจ
Only way to replace mole graphics is with SetSpriteOverride(158 , MagicMoleSprite); but this only allows for non animated .png.

EDIT: LoadSprite(f, 1, 0); the middle parameter tells how many frames it is, LMAO!

Author:  Zed [ Mon Aug 01, 2016 8:59 am ]
Post subject:  Re: Modify mole weapon

You can instead of extracting sprite files directly from the game, download a complete rip of WA's sprites from the internet (http://www.spriters-resource.com/pc_computer/wormsgeddon/sheet/13597/).

To animate mole projectile you can remove current digging sprite via replacing it with 99% transparent pixel using setspriteoverride, and apply a different animated sprite using scripts (AddSpriteEx). Using setspriteoverride with a new sprite is possible, but it wont allow for an animation, because it wont have rotation then (mole sprite is already 'animated' with rotation). AddSpriteEx allows to rotate animated sprite with one of it's parameters (float rot).

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