In my game, there is a spell where the protagonist can summon creatures to help him. For now, I have it so 4 are summoned at a time, each object being created around him at the NW, NE, SE, and SW corners. This works fine, but sometimes if you are too close to a tree or whatever, the object will be summoned inside and tree and the creature will get stuck in it. Although funny, is there a way to test to see if anything's in the way before the object is created? I was looking through the possible event conditions and the only one that's sorta' close was the "test to see if no objects in a zone". When I messed with it, I couldn't set the zone relative to my protagonist like I wanted to. Any ideas?
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
Make a detector for each corner, and reposition it at the guy. Or if you have MMF with the latest build, you can use the "collision mask - is obstacle" condition (under the storyboard controls), which tests if a X and Y position is background or not.
n/a
Deleted User
14th July, 2006 at 11:52:19 -
Create 4 invisible active objects that will work as detectors.
Then make an always condition that positions them around the player, at the same spot where the creatures are being summoned.
Then just check if they are over an obstacle or not, and if they are, make the creature summon on one of the other 'dtectors' maybe.
Del maybe where the creatures must be summoned you'll place a detectors which will be invisible and if detector isn't collind with for example tree summon monster../ yea all 3 in one time the same idea nice
It's too bad you can't negate something like this:
>If "object A" collides with "object B"
I mean, it would be way better if you could just do a test to see if an object DOESN'T collide with another, right? Of course I'm sure there's a slew of good reasons why they didn't implement this that would pop up during runtime.
Or is there a way to negate two object's collision that I haven't figured out yet?
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
That's not a bad idea FanofRPG. I'd have to do a work around of what I have though. As it is now, the summoned creatures treat trees and stuff as obstacles and they go around them. Thanks for the idea
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
That's it, you just need to either give it a flag that makes sure it's only tested once after creation, or else keep the detection events paired with the whatever triggers the creation (which might be trickier).
What I ended up doing is making an event that says:
> Always
+If (creature summoned) animation "appearing" is playing
+(creature summoned) collides with group.neutral then destroy (creature summoned)
I have objects like trees set to group neutral. I can't believe I didn't think of it myself, how embarrasing lol. It works fine now though, thanks everybody!
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!