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

Pages: 1 2 3 ... 109
1
at logic/scene behaviors is where my 2 actors are getting created-
at first i thought, since i m telling the app to create named actor,
it should know who is who,

The app will create the actors, but it's your job to keep track of them. You can set attributes for them, kill them, hide them...it's all on you. The app's job is to do what you tell it to, and nothing more (unless there's a bug :) ).


but when i went to attach the scene behavior to the scene,
it asked me which of the placed actors was who and who,
..when no actual players are even at the scene,
You can add actors in a scene with code or directly in the scene editor, and that's why it's asking you which actor is who and who. There's also the option to use an actor attribute for actors that you create with code (as you have)

so where is my mistake in this attached below?

I remember when I first made that mistake :)
The created event that you have there will only run once when the scene or actor get created and that takes less than a frame. So all your code starts and finishes in less than a frame. You create your actors and then you check if the mouse is pressed on your correct actor. Now what are the chances that you press the mouse exactly in the frame that the scene gets created?
 Remember that the code in your Created event runs only once then it stops, so if you want to always check if you pressed the mouse on your actor you can use the Always event or you can use the When the mouse is pressed event listener (there are multiple ways of achieving the same result)

Q: when placing font and creating text, that text can be used as actor ?
I don't think so, but don't quote me on that.

Q: when deleting a set background, or some times even by changing the appearance,
things go weird and actors are no longer placed properly, is it a bug?

I don't remember ever deleting a background, so I can't tell. Since there are multiple ways of achieving the same result, you'll eventually find a different way :)

2
It also depends where you put your code. It looks like you placed the code inside an actor behavior or an actor event, and that's not going to work.
The way I would do it is as follows:
I would use a Scene behavior or a scene event, and I would create my 2 actors from there. (the first image you posted in your previous message has the code).
 It's in that created event that you must place the block that I mentioned in my reply.
 In the same behavior I would check if I pressed on the 'correct' actor and randomly swap their position (the second image you posted) .
So basically the entire code you posted in the 2 images above would need to go inside a scene behavior, and you would only need to add that Set [correct] to [Last created actor] block in there.

3
I think you're trying to position your 2 actors if you press on the [correct] actor, but I don't see where you set the value for that [correct] attribute in your code. Without storing something in your attribute, Stencyl will have no idea on what actor you want to use that mouse press event, and it will simply ignore your code.
 After you create your Correct_Actor you can put a Set [correct] to [last created Actor] block. That way Stencyl will know what you stored in that 'correct' attribute, and it will know which actor needs to respond to a mouse press.

4
Q-how long does it get to learn this stencyl?

Whenever they add a new thing in stencyl you have to learn about it, so you'll always be learning new things. Happens with every other program out there (photoshop, blender, etc). :)

sure i managed to create some very simple games in just a few days,
they work all right, but i went through so many wrong paths,

That's the way everyone does it. You first try a really hard problem, make a ton of mistakes, then you try again, and again, and then you try some more, and then one day, without any reason, it finally works. And, after all of that, you'll get to find out it was extremely simple to do it "the proper way".  :o

That's how you actually learn, and that's how you end up with the next really hard problem that you must make a ton of errors to get it working.
But the feeling you get when you solve that problem cannot be expressed by words.  :)

 Learn to break your problem into smaller problems and start fixing those small problems until the big problem is solved.

P.S. Don't be too stubborn. Learn from that crash course as it will help you a lot. I've spent almost 3 weeks trying a million different things just to get an actor to move on a grid in 3 random directions   :'(

5
Ask a Question / Re: Can I make 3D MMO game like WoW in Stencyl?
« on: January 30, 2020, 05:16:23 am »
why not try WOW game but in 2d?

MMO-type multiplayer will also require monumental effort and coding outside of the Stencyl blocks, plus the need of a server to run your game world. I don't think you'll find a "plug and play" solution for multiplayer network and such.

Luyren's reply was not focused only on the 3d aspect of such a game.

6
Shared Resources / Re: Easy Code: Item Merging Game
« on: January 08, 2020, 08:49:38 pm »
There is no block for that, you must calculate that distance yourself using the Pythagorean theorem. If you need help drop a line here :)

7
Shared Resources / Re: Easy Code: Item Merging Game
« on: January 05, 2020, 11:50:42 pm »
You can also use a distance check instead of a collision event to let you know when you can 'merge' your item. Useful in card games where you want to snap the card to a position when you get it close enough.
Glad to see people trying to learn how to do things instead of relying on premade behaviors (there is a drag and drop one).

8
Extensions / Re: Poki SDK
« on: December 04, 2019, 03:35:36 am »
The SWF file will only work on flash games. You need to make your own with code. I once saw that the bar was being drawn behind the image that you chose for your background, so check to see if you don't have that issue first.

9
Extensions / Re: Poki SDK
« on: December 03, 2019, 09:07:56 am »
Seems to work fine in this game by Colburt187, and it also uses a custom preloader.
Can you post a link to that game from poki's website?

10
Extensions / Re: Poki SDK
« on: December 03, 2019, 07:02:24 am »
@rob1221 You can force the browser to use a slower loading speed, and you'll see if the bar works or not. Here's chrome's developer console option:


11
Ask a Question / Re: Can you add a CSS file to an extension
« on: November 28, 2019, 01:25:43 am »
Can't you change things from your .js file?

12
Ask a Question / Re: Seeing List Data During Gameplay?
« on: November 13, 2019, 10:34:50 am »
Maybe Debug drawing is to blame?

13
Ask a Question / Re: Seeing List Data During Gameplay?
« on: November 13, 2019, 10:07:56 am »
I usually just draw the list on the screen.

14
Ask a Question / Re: How to detect a collision once?
« on: November 05, 2019, 03:51:06 am »
Just add a boolean inside the collision event. If boolean is false, set it to true and run the code you need.
You can add a timer after that to set your boolean back to false if you need it.

15
Ask a Question / Re: Implementing API advice
« on: September 03, 2019, 10:39:19 pm »
You will need to make your own custom preloader in order to display their images while the game is loading. For that you will probably need a studio licence and a bit of help from Justin. Other than that it should be pretty simple.

Pages: 1 2 3 ... 109