Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> TGF coding HELP! - Character entrances
United States
M. C. Productions
Posted: Jun 9 2008, 10:01 AM
Quote Post


Mario series' gals = #1!
[*]

Group Icon
Group: Members
Posts: 700
Member No.: 3100
Joined: 22-December 06

Status: (0d) [--]


Okay, to those of you using TGF (classic) -- I NEED HELP!!! ohmy.gif

Here's the scenario: last night, I was beginning work on the events engine for one of my newest game projects (platformer/adventure) and was dealing with the first part of the process -- when one of my select characters makes his or her entrance into a section of the overall stage. My layout was this:

(1) Level Editor - Placed an entrance point (active object) off screen.
(2) Event Editor - The "code" I put is this:

CODE
Start of Level, Active Chararcter [specified at a certain menu in another level] = Create Selected Character (Entrance/Exit) at Entrance point
Selected Character (Entrance/Exit) has reached end of its path = Create Selected Character (Main*)

* Select Character (Main) means that the player controls him/her from that point on.


Now here's the problem, I have noticed that when testing my playable characters after they enter, I see that during the entrance event, the TGF environment created them TWICE! I know for a fact that something might be wrong on that front, but I need to know if I am missing a step or do I need to modify something in the Level Editor/Event Editor to get it to where the TGF application created just one character instead of two or three.

All right; thanks.
PMUsers Website
Top
Unspecified
Miaxis
Posted: Jun 9 2008, 10:09 AM
Quote Post


hagan bromas
[*]

Group Icon
Group: Members
Posts: 1799
Member No.: 2793
Joined: 12-October 06

Status: (0d) [--]


Try using "Only one action when event loops" as an additional condition in the character create event.


--------------------
user posted image

user posted imageuser posted imageuser posted imageuser posted image
PMEmail PosterUsers WebsiteMSN
Top
United States
Xgoff
Posted: Jun 9 2008, 11:11 AM
Quote Post


<):|
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03

Status: (0d) [--]


you didn't specify whether you had an event along the lines of:

Start of Level
--> Character 1 - Destroy
--> Character 2 - Destroy
... etc

at the very top of your event list. i'm assuming you don't, and that the "original" objects are still present on the level when it starts. if that's the case, those objects will trigger the create event when they finish their path, even though you don't want them to


--------------------

This post may contain original research or unverified claims.
Please disregard the above information and contact an administrator.

DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth:
DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message
DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it
DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep
DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot
this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence
NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above

QUOTE
(5:25:58 PM) Mikau: xgoff
(5:26:00 PM) Mikau: guess what
(5:26:04 PM) Xgoff: chicken butt
(5:26:09 PM) Mikau: **** you
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
M. C. Productions
Posted: Jun 9 2008, 03:03 PM
Quote Post


Mario series' gals = #1!
[*]

Group Icon
Group: Members
Posts: 700
Member No.: 3100
Joined: 22-December 06

Status: (0d) [--]


@ Xgoff - Forgot to mention that in my topic starter because I was in panic. Sorry about that. But yes, I did make sure to specify "Destroy" in the objects that created the said characters.

@ Latia - Thanks for the tip; I'll investigate into this later. Hopefully this will be the breakthrough I need.
PMUsers Website
Top
United States
kirbyhi5
Posted: Jun 9 2008, 04:12 PM
Quote Post


your typical MMF user
[*][*][*]

Group Icon
Group: Members
Posts: 1341
Member No.: 4893
Joined: 2-January 08

Status: (0d) [--]


QUOTE (M. C. Productions @ Jun 9 2008, 03:03 PM)
@ Xgoff - Forgot to mention that in my topic starter because I was in panic. Sorry about that. But yes, I did make sure to specify "Destroy" in the objects that created the said characters.

@ Latia - Thanks for the tip; I'll investigate into this later. Hopefully this will be the breakthrough I need.

however you should be careful where you place the "Only one action when event loops".

If you place it in the wrong order, it will sometimes cause odd problems later on. I remember I had a problem with something, and I couldn't figure out how to find it. Then I decided to change the order of the "only one action when event loops", and it worked.


--------------------
PMEmail PosterUsers Website
Top
United States
Xgoff
Posted: Jun 10 2008, 12:06 AM
Quote Post


<):|
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03

Status: (0d) [--]


QUOTE (kirbyhi5 @ Jun 9 2008, 03:12 PM)
however you should be careful where you place the "Only one action when event loops". 

If you place it in the wrong order, it will sometimes cause odd problems later on. I remember I had a problem with something, and I couldn't figure out how to find it. Then I decided to change the order of the "only one action when event loops", and it worked.

where "one action" is in the event shouldn't matter since it's an evaluated condition; however, if it displaced an immediate condition (in red), that could cause weird behavior depending on the immediate condition in question

This post has been edited by Xgoff on Jun 10 2008, 12:08 AM


--------------------

This post may contain original research or unverified claims.
Please disregard the above information and contact an administrator.

DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth:
DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message
DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it
DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep
DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot
this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence
NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above

QUOTE
(5:25:58 PM) Mikau: xgoff
(5:26:00 PM) Mikau: guess what
(5:26:04 PM) Xgoff: chicken butt
(5:26:09 PM) Mikau: **** you
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
M. C. Productions
Posted: Jun 10 2008, 12:06 PM
Quote Post


Mario series' gals = #1!
[*]

Group Icon
Group: Members
Posts: 700
Member No.: 3100
Joined: 22-December 06

Status: (0d) [--]


IT WORKED! smile.gif I nailed it via this procedure in the Events list:

QUOTE
Only one action when event loops + Character (Entrance/Exit) reaches end of it's path = Create (Character [Player]), Destroy Character (Entrance/Exit)


THANK HEAVENS! Now this yet brings another question...

Boss battles wise -- because this fangame project I'm doing will of course involve them. In the case of them shooting objects toward my character, would this be the breakthrough to use:

QUOTE
Every (insert a specfied amount of seconds) + Only one action when event loops + [insert any additional criteria here for different boss battles] = Shoot object towards main character


Because now I'm disappointed that I overlooked this when...

Spoilers:
I was dealing with the "final boss battle" on my first fangame and noticing that when hammers were launched toward Peach, at times she had two hits deducted from her health if the hammers collided with her!


Sorry for that rant, but I think I just realized something in TGF's coding procedure in the Events List.

This post has been edited by M. C. Productions on Jun 10 2008, 12:06 PM
PMUsers Website
Top
United States
M. C. Productions
Posted: Jun 15 2008, 09:44 PM
Quote Post


Mario series' gals = #1!
[*]

Group Icon
Group: Members
Posts: 700
Member No.: 3100
Joined: 22-December 06

Status: (0d) [--]


QUOTE (Xgoff @ Jun 10 2008, 12:06 AM)
where "one action" is in the event shouldn't matter since it's an evaluated condition; however, if it displaced an immediate condition (in red), that could cause weird behavior depending on the immediate condition in question

Yeah, in the engine that I almost have finalized for my new project, most -- if not all -- of the conditions are evaluated (which I'm not surprised), so I'm very sure I'm on the safe side on that front. I was testing those parts numerous times a few nights ago.
PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0641 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.22 ]