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 - infinitum3d

Pages: 1 2 3 ... 6
1
Ask a Question / Variability coding with Percentages vs. Real Numbers
« on: October 11, 2014, 07:50:15 am »
This is more of a theory question about programming rather than a Stencyl coding question.

I'm trying to incorporate a measure of variation into my AI.  My thought is that I want to use a basic 100 point scale. AI will start with a score of 50, and increase or decrease based on events.  For example, something good happens and the score goes up.  One way to do this is to say something like;

if GoodEvent=true
then AI_SCORE = AI_SCORE + 1

But for greater variation, I was thinking I could say;

if GoodEvent=true
then AI_SCORE = AI_SCORE + 1%

the percentage would allow for logarithmic higher increases at a higher score, and lower increases at a lower starting score.

My concern is that I will need to round numbers and/or use floating points which could affect performance (?)

So my question is, do I need to be concerned about this or should I just start testing it both ways. I don't want to reinvent the wheel so if anyone had experience with this is greatly like some guidance.

Thanks!

2
Hi. In 2.1 the events had a curved arrow for "looping"or continuing/repeated occurrence.  It could be turned off to limit an event to a single occurrence. The newest build doesn't seem to have this?! Am I missing something? Is there a work around?

I used it for collisions to limit damage to one point per collision.

Thanks!

UPDATE! Solved. They gave it it's own puzzle piece called "disable this behavior". It's red. Search for "disable".

3
Even though I have the size set to 0 pixels, there is still a little black dot following my actor;

See screen shot, attached.

Any suggestions?

UPDATE: Since I don't need a graphical display of the actor health, I went into the Edit Behavior screen and turned off  (unchecked the box) the "When Drawing" Event.

4
Ask a Question / Re: Creating level lists
« on: June 07, 2014, 07:43:22 pm »
You either need individual buttons, or one button with a numerical animation, as in 'set animation to 1' etc.

You could try a boolean like "isUnlocked" =false. Then when they complete a level, change it to true.

5
Resolved Questions / Re: How to make Actors impassable
« on: June 07, 2014, 07:40:30 pm »
Can you increase the weight of the enemies so that they are simply too heavy to push?

6
Thanks. I was hoping it wasn't just me.

7
So I started making my game in 2.1, then upgraded to 3.0 (which was a mistake as lots and lots of "corrections" needed to be made, but I digress).

Anyways, in 2.1, when I would make a minor change and click "test game", it took about 5 seconds to rebuild and load. Now, in 3.0, it takes 12-15 seconds to rebuild and load. Every time, no matter how small the change. Even if I don't make any changes.

Is there a setting that I can turn off, like the automatic Log Viewer?

8
Hey, thanks! I appreciate the help.

"to be clear, you have a player that, upon death, changes a game attribute."


Yes.

"Problem being that when the player goes off-screen, that attribute doesn't get changed, and the power-up doesn't spawn."

If I remove the SPAWN portion, the attribute does get changed. But if I include the SPAWN portion, the attribute does NOT get changed. And since its happening offscreen, I don't know if the SPAWN is occurring or not.

"If that's so, have you tried using a print statement to make sure the 'When self is killed' script runs?"

I have not tried that. Thank you for the test.

"Edit: Just tried this out for myself. Seems like print statements work, but creation of a new actor doesn't.
I tried spawning an actor from the 'when killed' script and attached a print script to the new actor upon creation, which didn't print."

Interesting. If I kill the actor on-screen, then the POWER UP creation occurs as expected. I wonder why it doesn't work off-screen. I'm assuming the KILL ON LEAVING SCREEN behavior immediately kills the actor and does not allow other scripts to be executed.

Hmmm... I'll have to figure out a work around.

9
In the Actor Events, I have;

When SELF is KILLED
set NUMBER to (NUMBER - 1)  <-- NUMBER is a Game Attribute
Create POWERUP at ACTOR X,Y  <<-- POWER UP is a new Actor

So this works fine when a bullet kills the actor on screen,
but when the Actor exits the screen NUMBER stays the same.

My assumption is that either
A) SELF is not being killed, which is unlikely because it works without the CREATE part, or
B) It is CREATE-ing a POWER UP off screen. More likely, but is that possible?

I've tried adding the Behaviour DIE ON LEAVING SCREEN to my POWER UP, hoping it would be instantly killed upon creation, but it still doesn't work.

Any suggestions?

Thanks!

10
Arghh!  I had the wrong default animation set. Thank you so much for taking the time to help me with this. I understand my mistake and the whole scaling issue.

Thanks again!

11
This should be the one.  You'll notice that if you set the creation coordinates of the fireball to 0,0 it is NOT the very  top left of the scene or screen.

This one has the fireball creation Y coord as sceneHeight/2 and the scene height is displayed as 480, but the fireballs are not created at the middle of the scene height.

Thank again for all your help!

12
Aw heck. Yeah that's the one but I must have changed the x and y at some point today and uploaded the wrong version.  I'll try to find the right one.

13
Ok. Took me a minute to figure out how. Here's the file.

14
Oh. Duh. Can I upload that here somehow or do I need something like dropbox?

Pages: 1 2 3 ... 6