playMaker

Author Topic: Send Event problem  (Read 2462 times)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Send Event problem
« on: July 24, 2012, 09:04:23 AM »
I think I'm running into a speed problem. I have this setup but it isn't throwing the Event on the projectile. See images.

Basically the weapon Creates the bullet object, stores it as a variable then next does a send event to that stored variable to tell it either a player or enemy fired it. I do this so I don't have to have enemy projectiles and player projectiles separately. This idea came from the problem that the projectiles were spawning inside the shield-like collider around the player and immediately colliding with him so it was necessary to define an originator tag or something and exclude that from its collisions.

I think the problem is that the send event is firing before the object is created and able to receive commands because when I test it and fire away then i see the bullets are hanging up on the Setup phase. The event is global and I've recreated it several times.

Ideas? I thought about throwing a bool to tell it when it can receive info and having the weapon wait for that but all that will do is clog things up it seems.
« Last Edit: July 24, 2012, 09:09:33 AM by Lane »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Send Event problem
« Reply #1 on: July 24, 2012, 01:39:14 PM »
Hi,

 I don't see any global event son the bullet fsm, so what event are you exactly trying to send to the bullet?

bye,

 Jean

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Send Event problem
« Reply #2 on: July 24, 2012, 01:46:45 PM »
I'm trying to send the firedByPlayer global event from the player to the bullet, when the bullet spawns it should listen for the event, then roll into the state and wait for collisions on the Enemies tag.

Inversely enemies would send the firedByEnemy event to the spawned gO and roll it into the other state which waits for collisions with the Player tag.
« Last Edit: July 24, 2012, 01:48:34 PM by Lane »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D