Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: colpolstudios on December 03, 2013, 06:06:03 AM

Title: send message issue when working with simple sprite pro or free edition[SOLVED]
Post by: colpolstudios on December 03, 2013, 06:06:03 AM
Simple sprite free edition: http://u3d.as/content/black-rain-interactive/simple-sprite/3vY

I am using the Axis event extended 8 ways direction. http://hutonggames.com/playmakerforum/index.php?topic=4516.0

In order to play an animation you need to Broadcast message ("PrePlay")

Then to specify what animation to play,

Broadcast message ("PlayAnimation", animation number).


My problem is on this second send message.

Send message action.

use owner, Broadcast Message, Don't require receiver

Method name PlayAnimation.

Parameter I am using an Int which I set to my chosen animation number.

I get a unity error "Divide by Zero exception".

I also tried to use a Float but get the same error.

I am no coder but the simple sprite java script code uses an Int already possibly that's the issue.

I have been testing and it seems the issue lies when pressing both keys.

I am using the Axis event extended 8 ways direction. http://hutonggames.com/playmakerforum/index.php?topic=4516.0

But do not know how this works could it conflict with the simple sprite code?

Help welcome
Title: Re: send message issue when working with simple sprite pro or free edition
Post by: colpolstudios on December 04, 2013, 05:18:49 PM
Awaiting answer
Title: Re: send message issue when working with simple sprite pro or free edition[SOLVED]
Post by: jeanfabre on December 09, 2013, 01:34:38 PM
Hi,

 This is to do with your logic actually.

 Basically, you are calling a function that use your variable for a division, and expect to divide a number with it, and you are likely passing 0 or a value that leads to a division by 0.

you should check for the offensive value you pass and prevent calling the method if you detect it.

Can you paste the full error, it will likely say what script is complaining.

bye,

 Jean