playMaker

Author Topic: [SOLVED] Send Event Data & Get Event Info actions not working...  (Read 1670 times)

bizilux

  • Full Member
  • ***
  • Posts: 171
    • View Profile
[SOLVED] Send Event Data & Get Event Info actions not working...
« on: September 12, 2013, 02:30:22 PM »
i made new topic since i changed a lot of things from previous topic

ok so i have a problem... i cant seem to figure out how to pass information from bullet to target...

my set event data, and get event info are not setup correctly i believe...

for example: i want to specify that Bullet Tank will do 100 damage, and Bullet Soldier will do 10 damage, (Bullet soldier will have other FSM ofcourse...)
and when target gets hit, i want it to read what damage it was in a variable... 

basically i need to know how to attach more information to the bullet...

this is bullet tank trigger


this is bullet tank Send Event  (Set event data is not really working properly)


this is target right now... (Get event info is not really working properly)



1 more question...
you think there's gonna be a problem when there will be lots of bullets and each hitting their targets? because of global variable collider?
« Last Edit: September 13, 2013, 06:35:07 AM by bizilux »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Send Event Data & Get Event Info actions not working...
« Reply #1 on: September 12, 2013, 11:37:54 PM »
Hi,

Indeed, you can't use global variables here.

 I created a very small working example to demonstrate how to pass data via events properly.

Study this, it only has two fsm and two states really.

The bullet set event data and then fire an event to the target. The target respond to the event and get the event info. The process is very simple actually, but I think you are getting confused with several concepts here.

If you are still confused let me know.

bye,

 Jean

 

bizilux

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: Send Event Data & Get Event Info actions not working...
« Reply #2 on: September 13, 2013, 05:35:36 AM »
thank you a lot!

you know what troubled me?   in Get Event Info... i knew i had to do something with Get Float Data... the only problem was i didnt knew that it basically asks in which variable you want to store that information

but then i would had a problem with that global variable anyways...


funny thing is: on stationary targets (like my base)  it only works when "Is Trigger" option is unchecked in Box Collider...
if its enabled it just goes past it...


one more things... i want to filter what that bullet hits... since i have friendly guys too...

so i think i need to use Trigger Event instead of Global event Collision Enter, so that i can get more filters for it... im  trying to get it work right now...


edit: ok i used collision event instead of trigger event and it is now working great, and i can specify collide tag :)
« Last Edit: September 13, 2013, 06:04:26 AM by bizilux »