Spawn Actor and Debug statement

Hi. I managed to create a gamesalad game that has a slingshot that shoots at moving actors(spawned every few seconds) from right to left. Initial without the slingshot, it was working fine. After I included the slingshot in, the spawn dont seem to be working.
I am thinking of using the debug log statement to identify what has gone wrong. However, I am not too sure what is supposed to appear. I have included a log debugging statement in my actor- controller that spawns the actor but not sure what sort of statement to put in. E.g what sort of expression e.g game.tags=crash(my actor is tagged to crash)? in there that I can put to check if the spawn is working or not.

Perhaps someone can suggest any other log debugging statement guide or similar questions that I can learn from.

Thanks.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    The Log Debugging Statement behavior is extremely useful. How you use it is up to you since it doesn't actually affect your code at all. There are a few options you might try:

    1. Add a message to let you know you've reached a certain point: "Got here!" This is useful when you think a rule should be firing but it isn't.
    2. Similar to #1, add chronological notes such as "1", "2", "3", scattered throughout the rules of one or more actors. If you see 1, then 2, then expect the actor to spawn before 3 but instead you see 3... then you know something is wrong between Log statements 2 & 3. It helps you narrow down the problem.
    3. Use one or more attributes to display their values at a given time.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.