PlayMaker Updates & Downloads > Share New Actions

Add Force Explosion 2D

<< < (2/3) > >>

szomaza:
Thanks a bunch for sharing actions!

I was looking for this one, but unfortunately it does not work with the latest version of Playmaker and Unity.

It says:

--- Code: ---Assets/PlayMaker/3rd Party Actions/Explosion2D.cs(30,13): error CS0246: The type or namespace name `PlayMakerUnity2d' could not be found. Are you missing an assembly reference?

Assets/PlayMaker/3rd Party Actions/Explosion2D.cs(31,13): error CS0246: The type or namespace name `PlayMakerUnity2DProxy' could not be found. Are you missing an assembly reference?

Assets/PlayMaker/3rd Party Actions/Explosion2D.cs(115,17): warning CS0114: `HutongGames.PlayMaker.Actions.Explosion2D.DoTriggerEnter2D(UnityEngine.Collider2D)' hides inherited member `HutongGames.PlayMaker.FsmStateAction.DoTriggerEnter2D(UnityEngine.Collider2D)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword


--- End code ---

jeanfabre:
Hi,

 I have put this action on the Ecosystem, can you get it and let me know if it works ok on your end?

https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/master/Assets/PlayMaker%20Custom%20Actions/Physics2D/Explosion2D.cs

 bye,

 Jean

szomaza:
Hi Jean,

Thank you very much!

I tried it and found 2 problems:
- the timer reaches 0, there is no explosion and the timer keeps running counting down to smaller negative numbers and FINISH event is never called,
- it gives a few of the following error when the timer reaches 0


--- Code: ---NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.Explosion2D.DoExplosion () (at Assets/PlayMaker Custom Actions/Physics2D/Explosion2D.cs:104)
HutongGames.PlayMaker.Actions.Explosion2D.OnFixedUpdate () (at Assets/PlayMaker Custom Actions/Physics2D/Explosion2D.cs:97)
HutongGames.PlayMaker.FsmState.OnFixedUpdate () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:240)
HutongGames.PlayMaker.Fsm.FixedUpdateState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2678)
HutongGames.PlayMaker.Fsm.FixedUpdate () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2005)
PlayMakerFixedUpdate.FixedUpdate () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFixedUpdate.cs:18)
--- End code ---


Br,
szomaza

jeanfabre:
Hi,

 ok, fixed, please update the action.

 Bye,

 Jean

szomaza:
I just checked quickly and there is no more error, but I can't seem to get it to push anything.
Tried a few different settings and I am not sure if I am doing something wrong or it just does not work.
I can see the radius expanding during play but 2D phys objects around are not pushed.

All those values that need to/can be set are a bit confusing.

I'll stop with this now.
Please post a screenshot if/when somebody gets it working.

Edit:
I needed this again and managed to figure out what I was doing wrong: The object needs to have a Circle Collider 2D, as the action grows that to push stuff.
Please improve the action when you have some time to warn if the Circle Collider 2D is missing.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version