Project X Forums



It is currently Wed Oct 16, 2019 7:58 am

All times are UTC




Post new topic Reply to topic  [ 110 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next
Author Message
 Post subject: Re: CWeps8
PostPosted: Sat Aug 16, 2014 12:55 am 
Offline

Joined: Wed Jul 31, 2013 4:03 pm
Posts: 35
Location: Ukraine
Quote:
► Firing some collision weps near the ground close to worm might give an error but as long as you try
to avoid it shouldn't be an issue.

one of the simplest workarounds is adding a null-check in line 34 of collisions script:
Code:
32: ...
33: tballo = CGObject(Env->Objs.Objs[Env->Objs.Count-1]);
34: if (tballo != NullObj)
35: if(tballo->ClType == OC_Missile)
36: ...

WA creates NullObj when worm shoots ground beneath himself.

btw, Curtis, is it possible to disable weapon movement in worm's hands? some hl-gamers dislike it.

and, yeah. one more thing.
from javelin script in damage-function:
Code:
local damage = 1;
if(weap->CheckName("Javelin") == true)
{damage = 20;}

there is one problem with this code: javelin's damage (as well as crossbow's and ninja star's) is untweackable.
i play a ktk scheme usually that has separate lib called javelin7dmg.pxl. i think you have an idea why it is separated :P. can you please make some sort of parameters (at least global, because there are no classes for javelin and crossbow) in your lib to be able for users to tweak damage.


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Sat Aug 16, 2014 2:04 am 
Offline

Joined: Sat Aug 09, 2014 1:30 am
Posts: 40
Danylo wrote:
Quote:
from javelin script in damage-function:
Code:
local damage = 1;
if(weap->CheckName("Javelin") == true)
{damage = 20;}

there is one problem with this code: javelin's damage (as well as crossbow's and ninja star's) is untweackable.
i play a ktk scheme usually that has separate lib called javelin7dmg.pxl. i think you have an idea why it is separated :P. can you please make some sort of parameters (at least global, because there are no classes for javelin and crossbow) in your lib to be able for users to tweak damage.



create a script in the scheme and override this function and change the value

Code:
override void CMissile::JavelinDamage(CGObject* target)
{
                     local damage = 1;
                     if(weap->CheckName("Javelin") == true)
                     {damage = 10;}   //20; default

                     target->SpX = SpX/4;
                     target->SpY = SpY/4;
                     
                     CMessageData msgdamage;
                     msgdamage.params[0] = 3;
                     msgdamage.params[1] = PosX;
                     msgdamage.params[2] = PosY;
                     msgdamage.params[3] = SpX/2;//doesnt work for some reason..
                     msgdamage.params[4] = SpY/2;
                     msgdamage.params[5] = damage;
                     msgdamage.params[6] = 0;
                     target->Message(NullObj, M_GUNEXP, 1032, &msgdamage);
}


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Sat Aug 16, 2014 2:10 am 
Offline

Joined: Sat Aug 09, 2014 1:30 am
Posts: 40
by the way Curtis, great work, alot of good weapons, i like so much


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Sat Aug 16, 2014 3:24 pm 
Offline
User avatar

Joined: Mon Dec 05, 2011 1:14 am
Posts: 242
Hey Danylo + rafa``2

Thanks for that collision fix Danylo....I can't tell you how long I've wanted that set right :)
Rafa's method for tweaking the damage works perfectly....

As for the animations when aiming:

Params->animate = true;

you can find these within the aiming sections of sprite builder scripts and change them to false which will make them static
but if there's a way to do that within the scheme like rafa's jav method I would go that route..... (if possible)....

Thanks Rafa....I really like your EMP and new sentry turrets....sound effects and animation when activating EMP is quite impressive....


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Mon Aug 25, 2014 10:10 am 
Offline

Joined: Wed Jul 31, 2013 4:03 pm
Posts: 35
Location: Ukraine
rafa2, thank you man, but this way is obvious for me. i know that i can override the whole function with copypasting the whole code and editing one line with damage setting :D but the problem for me was that this is extremely bad style of coding. i think you understand what i mean.


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Mon Aug 25, 2014 10:50 am 
Offline

Joined: Wed Jul 31, 2013 4:03 pm
Posts: 35
Location: Ukraine
Curtis, i think i have an idea how to make a possibility for scheme maker to set/unset the animations...
for example, using global variable, say
Code:
bool cweaps_option_weap_anim;
void cweapsOptions() {
  cweaps_option_weap_anim = true;
  // ... (mb some other options here)

cweaps::Init() { cweapsOptions(); }

and use this line instead in sprite builder code:
Code:
Params->animate = cweaps_option_weap_anim;

then scheme maker can script his own preferences:
Code:
override cweapsOptions() {
  super;
  cweaps_option_weap_anim = false;
}

however some weaps are not animated but rotated and this fix won't work for them, but the same approach can be applied for rotated weaps...
what do you think?


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Mon Aug 25, 2014 5:32 pm 
Offline
User avatar

Joined: Mon Dec 05, 2011 1:14 am
Posts: 242
Hey Danylo...

Looks good dude...I understand where your going with this despite my lack of scripting knowledge....I was a lil confused about what you meant by "some weps don't animate but rotate".....which ones?......anyhoo do what you godda do and pls keep my updated....its' interesting...


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Thu Oct 02, 2014 12:11 am 
Offline

Joined: Thu Aug 16, 2012 1:30 pm
Posts: 18
Thx Curtis for bringing back older Gravedigger, Magic Slammer and Remote Roller versions in the roster.

As the official Kaos PX developer I must say that the Remote Roller Strike is a very good weapon from your newest additions. I also love how S.M.A.R.T Bomb is developed.

Keep up the GREAT job dude.

Cheers


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Thu Nov 20, 2014 9:43 pm 
Offline

Joined: Sat Aug 27, 2011 10:16 pm
Posts: 15
Is it possibe to add all these weapons to my own Scheme easily?


Top
 Profile  
Reply with quote  
 Post subject: Re: CWeps8
PostPosted: Tue Dec 30, 2014 6:09 am 
Offline

Joined: Tue Dec 30, 2014 6:03 am
Posts: 9
Hello guys i have a problem: When i select the scheme it gives me an error:
Code:
PXS : CError : TRZ : ProcessGetter : Undeclarated method - SetAngle@f
at Lib: p_sprite_builder.pxl: Script: worms_anims_script:444

Plz help me! I thank you!

_________________
I wish to have W:A on Android and iOS!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 110 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane