Stencyl 3.4.0 is now out. Get it now!

Tikikala's Journal thread

Tikikala

  • Posts: 38
I am so happy so I am posting these.

for my first game, a point and click escape

The first attachment (code2 correct) is where it will create first, something that's not really part of the inventory but will be useful for the game. Then, it will check the list attribute to see if it matches the item's name, where if it is true, it will create a picture, a separate, inventory actor on screen.
----
on second attachment, clickable backgorund, it is where items found on the background will only shows up if you haven't click it yet.
once you click it, it will be added to the inventory list, and then kill itself and reload the scene to update the inventory.
-----
on the last pic, item background, it will check if the item is found yet. if it isn't, then it will be created on the scene. if it's not, it won't be created. as seen earlier, once it's clicked it will refresh, so it won't be created.
the loop just check if it has the item, straight to the point
-------
also the list attributes item are just 0, then when it's updated it won't be 0

Tikikala

  • Posts: 38
so after asking the questions and have time to work on game again, i'm back.

I created booleans for checking if it's true or false after you click something, because some actions require combining actions.
Then I created a group of booleans called events to see if you used or placed an object/actor, so that once  you do a thing, it's set to true and it can't go back.

because all my events are concnetraed on one scene, I have to use cascading If conditions to check if the events are true, so that when you go to the scene or it reloads, it will create things in order.

the second image, simply. check if you click somethign and then something else, it will reset the wrong combination back to false. ... but I'm prob not doing it in the most efficient way. what it seems to happen is that the boolean and if only checks if the event related to the actor is done. Once it's done, it sets the true false of "did i click the other object before" of every inventory items to false.  it might be redundant though because the separate booleans for event already let the actor be invisible or visible based on if the event is activated yet.

It also check that if the event had happened,  it will just hide the actor from appearing  again for players to click them.

ceosol

  • *
  • Posts: 2129
Do you have screenshots of this in action? I am not exactly sure what you are trying to do, but it looks a lot more complicated that is probably should be. Aren't you going to wind up with massive if statements after finishing up your inventory lists?

For something like an inventory, I just call things as numbers. For instance, instead of tp inv, I would just call it the number 0. Then you can associate everything to zero.
get item #0 from list
spawn actor with name 0 as text
set any random attribute to 0

Making everything as a number you can then simplify your inventory spawning:
repeat 20 times (current loop count)
    if get item (current loop count) from list >0
        create actor with name (current loop count as text)

That would work the same will all inventory actors all in one loop with one if statement.

Tikikala

  • Posts: 38
I kind of just published my game, but im down for simplifying steps.

http://www.kongregate.com/games/Tikikala/simple-hamster-escape

Tikikala

  • Posts: 38
SORRY to double post but i made a revision to my game using text things.

so I have a text attribute. that when you click on actors, it will set text to something else. And that when certain events have been done, they will display different texts as clues. so basically a whole bunch of if = true/false blocks to dictate what the text says, and when you enter final scene, I reset the text back to what it says

I also made a scene behavior and attach it to all the scenes that uses it, and on the scenes also enable it under when created. IDK if this is redundant.

I'm also saving this "center text" thing for future reference

in the draw text behavior that i attach and enable to all scenes:
when drawing
set font to whatever
draw (text attribute) at : X= (scene width/2) - (get width for text attribute using font T/2), Y= whatever

and then i attached this cascading if statement to this actor, the gate/door. that when created, will set text to whatever based on true false of events. so that it's only showing when you're on that scene with that actor.

the new version is now re-published on kong and on stencyl. it's like 90 something mb now

Tikikala

  • Posts: 38
Just posting screen shot for future reference

first one is a scene event that let you move up or down the screen using keys up and down.

second one is mute button

third one is pause button. I didn't tint the screen or whatever but I drew a text.
the fill color might not be needed since my font already have the color

Tikikala

  • Posts: 38
saving for future reference

drawing Hp Bar on top. a "empty" bar for underneath the full hp bar
then a bar for decreasing hp

and then drawing things when game over or level cleared is true

Tikikala

  • Posts: 38
I'm going to also document how i solved log viewer errors okay? knowing how to solve my own problems can save your game making confusion too!

Quote
Unexpected attribute type: UNSELECTED
Level:     WARN
When:      2017-10-09 23:48:30:415
From:      stencyl.sw.editors.snippet.designer.block.BlockSceneObjectChooser

Solution: Those block things in a scene/actor are also called snippets, and they weren't attached properly to like, the block above it