The Daily Click ::. Forums ::. Klik Coding Help ::. A question about creating objects
 

Post Reply  Post Oekaki 
 

Posted By Message

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
14th July, 2006 at 11:47:48 -

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!

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
14th July, 2006 at 11:50:59 -

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.

 

Fanotherpg

I'm living proof

Registered
  26/06/2004
Points
  522

Game of the Week WinnerKlikCast StarHas Donated, Thank You!Second GOTW AwardVIP MemberHasslevania 2!The OutlawPokemon Ball!Evil klikerComputer
I am an April FoolI donated an open source project
14th July, 2006 at 11:52:40 -

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

Image Edited by the Author.

 
www.therpg.pl

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
14th July, 2006 at 11:59:44 -

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!

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
14th July, 2006 at 12:18:20 -

you can negate object overlapping events
or compare the x/y co-ordinates, maybe

Image Edited by the Author.

 
My signature is never too big!!!

Fanotherpg

I'm living proof

Registered
  26/06/2004
Points
  522

Game of the Week WinnerKlikCast StarHas Donated, Thank You!Second GOTW AwardVIP MemberHasslevania 2!The OutlawPokemon Ball!Evil klikerComputer
I am an April FoolI donated an open source project
14th July, 2006 at 12:39:32 -

Or you can if summond demon collides with tree or overlaping when created destoy summoned demon...

 
www.therpg.pl

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
14th July, 2006 at 14:05:52 -

Ahhhh!!

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!

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
15th July, 2006 at 01:22:43 -

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).

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
15th July, 2006 at 07:42:01 -

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!
   

Post Reply



 



Advertisement

Worth A Click