Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tguile

Pages: 1 2 3 4
1
I have a game where I click on countries and if I click right I change the color of the country black and replace that countries name in the list with done. I do that so I can keep track of where all the countries are in the list. I have like 38 countries in a list called countries. A country name is printed
on the screen. I click it, it turns black. Its name in the list is changed to done. After that I need
to randomly get an item from the list so I can print another random country thats left to click on.
I need to check if that item does not equal done. If it doesnt then that item will be printed. If
it does equal done I need to get another random item from the list and check again. I have to do
that till I get an item returned that isnt equal to done. Can anyone right a behavior to do that?
I have tried numerous ways and no luck. It either does nothing, returns true or false or just cycles
through all the items nonstop. Thanks.

2
Ask a Question / How to enable disable mouse clicks?
« on: December 30, 2011, 03:13:52 pm »
OK. I now have a behavior that works for all my countries if you click it right. Except for a delayed
printing thing where I say its correct then print the next country and print an updated score.
I am working on what to do if it is clicked wrong now. All I did was try to randomly reset the country
again. I put in an otherwise and randomly got the name from the list. The problem is when I did that
it changed it to black whether it was correct or not. It didnt do that before. I thought maybe the
mouse click was on and just kept executing the code till it got set to portugal and changed it black.
I put in a disable this behavior hoping it would stop the execution and that worked. But now I cant
click on portugal again. Do I need to enable after disableing it or do I need something totally different? Thanks

3
I may have it. I created an actor type attribute and it already set it to portugal. I guess it will change that for each country it is applied to. Thanks

4
Yes, the name of the actor type sounds like something I want. The names in my list are the same
as my country or actor names. Could you be more specific on how to create this. Im not sure how
to do this.

5
Thanks. If no one else has something easier I may use that. I have 38 countries but duplicating
that code is easy.

6
Ask a Question / How to make this one actor behavior work for all my actors
« on: December 30, 2011, 12:59:28 pm »
OK. I have changed my actor behavior to apply to all my actors. The only problem I have now is
how do I deal with if Portugal = random. I would need to change that for all my countries so I
cant use this behavior for all my countries. My countries are named the same as what I put in
the list. Could I put some code in there that returns the actor name? Or is there another way.
Thanks.

7
Ask a Question / Re: Can you fill an image with color?
« on: December 30, 2011, 09:17:20 am »
Im not sure what you mean. I have problems understanding how the stencyl interface works
without some sort of screenshot. Im learning by reading some things from the stencylpedia
that have screenshots and whatever tutorials I come across that show what they are clicking.
I got a plain image and an image filled with color. The plain one I start with and then when it tells you to pick a country and you pick it right it blacks out. Do you mean just add a frame for the
plain image and a frame for the black image and use code to print the black one? I have 2 actors
I use now and just print the black one at the same spot as the plain one.
Thanks

8
I fixed the problem I was having with the scene printing. I just used a local attribute for the scene
printing then I set my game attribute to the local attribute. It was a good debugging thing though
because I seen that portugal was removed from the list and it was only randomly printing
the only 2 items left in the list. So I wasnt getting portugal again or undefined which is what i want.
I still need help with the rest of it. Thanks.

9
And I have this actor behavior:
1. I want to use portugal behavior many times for my other countries with small modifications.
How do I rename portugal behavior to germanybehavior when I make the germany modifications?
2. If portugal is the item in the list I can click other countries and then come back and click portugal. I havent added any behaviors to the other countries but I dont want to come back and
click portugal. But I will see how that works after I add behaviors to the other countries. I will reset
the item so it may not be a problem.
3. When portugal is the item in the list and I click it the image turns black like I want but the scene
prints italy or spain. I dont want that. I want the scene to  print only at the strat of the game.
I will handle the printing from the actor behaviors after the game starts. How do I fix this?
4. And after portugal is blacked out I dont want clicks to work on it anymore. What do I do? I guess
I take off the mouse listener but dont know what code to use.
Thanks

10
OK, first of all I have this scene behavior

11
Ask a Question / Re: How to find X Y coordinates of an image on stage.
« on: December 30, 2011, 06:39:32 am »
Thank you. I found it.

12
Ask a Question / How to find X Y coordinates of an image on stage.
« on: December 30, 2011, 06:27:36 am »
Is there a way to find the X Y coordinates of an image on stage other then selecting it and seeing
its coordinates that way? I am not able to select all my images and need the exact position of them all. Thanks

13
Ask a Question / Re: Contines drawing random text
« on: December 30, 2011, 01:34:58 am »
OH, duh. You said when created. Its working now. Thank you.

14
Ask a Question / Re: Contines drawing random text
« on: December 30, 2011, 01:32:09 am »
Man, still no luck. Still cycling.

15
Ask a Question / Re: Contines drawing random text
« on: December 30, 2011, 01:29:03 am »
But. storing it in a text game attribute would let me use it in a actor behavior to check if the
countries match. I just need it to stop cycling or whatever it is doing. Thanks.

Pages: 1 2 3 4