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.

Topics - AvistTorch

Pages: 1
Resolved Questions / Actor Attribute and Draw Text questions
« on: June 08, 2011, 10:44:47 pm »
Basically, I'm making a turn-based strategy game, and I created an actor to act as the HUD where unit stats will be displayed upon mouse-over.  I'm not sure how to get this to work, though. 

My first attempt involved having a scene behavior generate the HUD (which switches sides on the screen upon mouse-over so it doesn't permanently cover part of the map), and storing the HUD in an Actor attribute in a behavior that displays stats on mouse-over so I can draw text on it.  However, I can't find a way to reference this actor.  I tried using the "for all actors of type" on the HUD actor, but that didn't work because the setter only accepts Last Created Actor, Last Collided Actor, Attribute, and Self.  Do I have to use Code Mode?

Also, when I try to display text at an Actor's location using the Draw blocks, it appears offset for some reason.  (Attached screenshot.)  Am I doing something wrong? 

Current blocks used:
When Drawing
If Mouse is over Self
set current font to HUDFont
Draw text ANYTHING at (x: X of Self y: Y of self)

I haven't actually tried this yet, but would it be possible to store an Actor as an attribute (rather than a reference to it as I assume the Actor attribute does), then remove the Actor from the scene and have the attribute retain all of the Actor's information?  Or would I have to use a list and store all of the actor's attributes in there, and apply them to a newly created actor in order to "unload" the actor back onto the scene?

An example would be loading a unit into (then offloading it from) a transport unit in a turn-based (or real-time) strategy game. 

Resolved Questions / Accidentally published game
« on: April 15, 2011, 11:16:58 pm »
I just made a n00b mistake and accidentally published something completely incomplete.  How do I unpublish it? 

Sorry about that. 

EDIT: This first error occurred due to a strange bug I can't reproduce.  The answered question in the title is in a later post.

Basically, I've been trying to make it so that a cursor will move across the screen at a certain rate in steps of 1 tile (32 pixels) at a time.  Of course, this happens far too quickly if I just set it to go while the button is held.  I tried creating a variable that is set to 1 every time the cursor moves (and back to 0 after 0.1 seconds) so that it'll move every 0.1, but the block doesn't seem to allow steps that small, and the cursor ends up moving about every second instead.  Does the "do after _ seconds" block not accept decimals?

If not, is there an alternative I'm missing?  Thanks.

Pages: 1