Destroy Actor Happening Too Quick

robert.mccarthyrobert.mccarthy Member Posts: 165
edited February 2012 in Working with GS (Mac)
Hi,

I am spawning an actor (when I click another actor), and constraining straight away to mouse X/Y when my mouse is down (no problem here).

No problem here yet:
My actor is spawning at X position 75, under my mouse when I click.

Explanation here:

If I release my mouse off the actor when it is in X position 150 or less, or if I drag it out past X position 150 and then move it back into an X position less than 150, when I release my mouse I want it to destroy.

Problem:

My problem is that because I am spawning it in the X position less than 150, it should not destroy straight away as my mouse is down, but it is.

I think that it is not recognizing that the mouse is down, even though it is.

Can anyone shed any light on this please?

Many thanks,

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    edited February 2012
    @robert.mccarthy ... perhaps create a Game attribute MouseDown and change it to true when mouse is down and false when mouse touch is released (or in the otherwise part of the rule) and then in your spawned actor have it destroy when x<150 and Mousedown is false? I'm thinking that your mouse down is registering with your main actor but because it happens before a spawned actor is created then that spawned actor isn't registering the mouse down. (Disclaimer: just typing what I would be looking at if it was me not based on a specific knowledge of spawning or the underlying mechanics).
Sign In or Register to comment.