The Daily Click ::. Forums ::. Klik Coding Help ::. A problem with dark disappearing
 

Post Reply  Post Oekaki 
 

Posted By Message

Phantom Pheather



Registered
  09/07/2003
Points
  8
14th October, 2004 at 22:24:05 -

The player is in the dark (somewhere? anywhere), and hes got like a little circle of illumination which follows him around. I'm trying to make it so that whenever an enemy enters the circle it becomes visible, and then goes back to being invisible when it leaves. Also, I'm trying to get a number to pop up over the head of the enemies (so the first one in the light would have a 1 over its head, the 2nd a 2, etc.). If possible, I'd also like to make it so that if the 2 enemy leaves, the numbers above it move down.

My problem is getting the enemies to disappear when they actually leave the circle (right now the enemy is a clone as opposed to a duplicate) and getting the numbers to change when one leaves (4->3, 3->2, etc.).

So if anyone has any advice:
- making cloned enemies disappear when they leave the circle (but only the ones outside the circle)
- making the number indicators change when an enemy does leave

And yes, I am a a mostly newbie, so "ha ha i suk i r n00b". Yeah. Thanks for helping/taking time to try and figure this out/reading this. In advance.

 
n/a

醤油の兵士

Almost Human

Registered
  12/06/2002
Points
  173

VIP Member
15th October, 2004 at 00:17:37 -

I'd put them all in group enemy. then use the events:

group.enemy is overlapping light -> Make Group.Enemy visible
(X)(that's a negate) group.enemy is overlapping ligh -> Make Group.Enemy invisible

That should work without killing the processor using ink effects on them

 
As a boy, I wanted to be a train. I didn’t realize this was unusual—that other kids played with trains, not as them.

Phantom Pheather



Registered
  09/07/2003
Points
  8
15th October, 2004 at 00:21:36 -

Alright. I'll try that. And it should be I have duplicated enemies instead of cloned ones. Because the two terms are simply confusing. But yeah. Thanks.

 
n/a

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
15th October, 2004 at 08:44:31 -

It depends what program you are using, object groups in TGF are the spawn of Satan. Not really, that was just a lie.

 
n/a

Phantom Pheather



Registered
  09/07/2003
Points
  8
15th October, 2004 at 19:27:32 -

You lie to me? I am hurt.

Na. I'm using MMF. Well...I say using. Perhaps bludgeoning is a better word.

 
n/a

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
15th October, 2004 at 22:11:02 -

William Henry Clarence Hereditary Chief of Mosquito.He was born 1856, and educated privately at Kingston, Jamaica.He succeeded on the death of his uncle George Augustus Frederic II, 27th November 1865 and was crowned, ca. 23rd May 1866.He reigned under a Council of Regency until he came of age and assumed full ruling powers, 1874. He was posioned 5th May 1879.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
16th October, 2004 at 11:29:05 -

I wish I had a pet monkey.

 
.

Phantom Pheather



Registered
  09/07/2003
Points
  8
16th October, 2004 at 18:21:40 -

I agree.

But back to my problems (and yes, I have LOTS of problems)...I can do it fine with different active objects, but like, if its all the same object (ie, Enemy1 copied a bunch so there's about 5 Enemy1s. Enemy1's. Whatever. Multiple of them.) then they all remain appeared if only one is in the light source. Is this possible to overcome? Without using like...CodeGods v. 99.999?)

 
n/a

Rick (AntiMatter Entertainment)

Possible psychotic

Registered
  18/10/2002
Points
  814

VIP Member360 OwnerWii Owner
17th October, 2004 at 04:04:49 -

You don't need to put them in a group. Say your enemy is called "enemy" and the circle of light is called "light circle". Tricky stuff.

(x) indicates negate.

CONDITION:

"enemy" is overlapping "light circle"
EVENT:
Make "enemy" visible

CONDITION:
(x)"enemy" is overlapping "light circle"
EVENT:
Make "enemy" invisible


 

Phantom Pheather



Registered
  09/07/2003
Points
  8
18th October, 2004 at 18:57:53 -

It is EXTREMELY TRICKY. Oh wait. No. That's cooking rice. Anyway, in spite of all of your (thats plural, as in all of you all's) help, (even if you did say the same thing. Every one of you. Oh well, no one said repetition was such a bad thing.) I've officially decided to go to something simpler. Like an MMOFPS using Mode7. Only not.

Thanks again. And sorry for wasting your valuable time.

 
n/a

Phantom Pheather



Registered
  09/07/2003
Points
  8
21st October, 2004 at 17:29:49 -

Doesn't it, though? I mean, think of all the cool new features I could bring to both the MMO and the FPS genres!

- Graphics are not my strong point.
- Mode 7 is like...well...yeah
- And online? I am most DEFINITELY the online god. Look at my...wait...no.
- Massive coding streamlining. Since I am SO good at coding stuff.
- My current fanbase. *ahem* I think that speaks for itself.

 
n/a

Rick (AntiMatter Entertainment)

Possible psychotic

Registered
  18/10/2002
Points
  814

VIP Member360 OwnerWii Owner
21st October, 2004 at 23:59:45 -

We probably all said the same thing because that's how it's done.

You tried that and it didn't work? Hrm. Do you use a 'light circle' (a circle object that follows the character), or a 'dark circle' (a black box that covers the playfield except for a circle cut out in the middle that snaps to the player) for your dark effect? If you're using the dark circle method, try negating the first condition I said and putting the second one as normal, without negate. The code I've put above there would only work if the circle of light was an object rather than a transparent part of an object.

 

Phantom Pheather



Registered
  09/07/2003
Points
  8
22nd October, 2004 at 18:37:39 -

I realize thats how its done, and I got that to work fine. My real question (which perhaps I worded badly) was if it was possible with more than one copy of the same enemy. Example:

My enemy is named Enemy 1. I CtrlC and CtrlV it so there is 8 Enemy 1's. At the current point, whenever ANY Enemy 1 is in the light, ALL of the Enemy 1's that have touched the light stay visible. I am wondering if it is possible to make it so the Enemy 1s only appear when in the circle, so I don't have to make ALL the enemies separate objects. If that made any sense.

And I'm using a light circle that follows the character.

 
n/a

Rick (AntiMatter Entertainment)

Possible psychotic

Registered
  18/10/2002
Points
  814

VIP Member360 OwnerWii Owner
22nd October, 2004 at 20:05:19 -

Try adding the "Pick one of" line in each condition, that should do it.

 

Phantom Pheather



Registered
  09/07/2003
Points
  8
22nd October, 2004 at 20:49:16 -

You, man...you're like GOD. It worked. Thanks.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click