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

Pages: 1 2 3 4 ... 19
16
Ask a Question / Re: Can't add item to array
« on: October 20, 2020, 09:44:50 am »
It can't be that the attribute was not a List. I tried to set CurrentTpreference to Tpreference and it works. But when I tried to get an individual number from the Tpreference list, it says it failed to convert to Array. Both are Lists.

17
Ask a Question / Can't add item to array
« on: October 10, 2020, 11:35:31 am »
I'm trying to add an item to a List, but an error came up saying that it can't convert the item to array. What does it mean?

18
Ask a Question / Re: List being repeated after every scene transition
« on: September 27, 2020, 10:30:12 am »
Ah, I kept thinking that it was the CurrentFoodPreference created event that was the problem, but it was actually the AddFood when created that was causing the duplicate. That fixed the problem, just that the emoticons tied to the FoodPreference failed to display emoticons (not sure why), but I fixed that by using Code:Actor.getName(). It seems to be working properly now, thanks!

19
Ask a Question / Re: List being repeated after every scene transition
« on: September 26, 2020, 10:10:36 pm »
I want it to retain it's value, but not being created multiple times like in the video. My other list game attribute don't have the issue and doesn't duplicate.

I'm able to change the items in the List, but each time the scene change, the items will be duplicated. If I change the scene 3 times, it'll show Chicken Chicken Chicken. When the food preference change, it'll be Beer Beer Beer. So if I change scene again, it'll show 4 times. I wonder what's causing it to display each time I transit scene.

20
Ask a Question / List being repeated after every scene transition
« on: September 26, 2020, 08:47:23 am »
Hi,

I have an issue with the items in my list being repeated each time I change scenes. Is it because of the Created events?

I want the current food preference to show just 1 set of type of food list, instead of it being repeated each time I change scene.

21
Ask a Question / Re: Can't find attribute that I created
« on: September 20, 2020, 07:55:40 am »
This should explain what you need to do: https://youtu.be/R7CB7xwoLyo?t=211
I do recommend you watch the whole thing do, to learn a bit more on each attribute type.


This video tutorial is actually really good, thanks! The explanation is good too. Should include this under the Encyclopedia.

22
Ask a Question / Re: Can't find attribute that I created
« on: September 20, 2020, 06:45:02 am »
I'm able to create an Actor attribute, but how do I set the actor attribute to the actor that I want? When I go under Actor Settings, I don't see that I can set it to a particular actor, mainly last created actor, self, etc, because I want it to be set to a particular actor that is already on the scene.

23
Ask a Question / Can't find attribute that I created
« on: September 19, 2020, 11:06:14 pm »
Hi,

I created an attribute called pet, it doesn't show in the drop down list when I choose Attribute in the block. I tried reading up on attributes in the stencyl encyclopedia, but the attriit only tells me the types of attributes that I can create. So I'm not sure why the Actor Type attribute I created could not be shown, only Actor attribute can be shown.

24
Extensions / Re: Extended Math [v1.0]
« on: September 16, 2020, 07:22:55 am »
Hi,

I'm trying to use the distance block but there's something I don't understand. I want it to measure the distance between Self and an Actor (pet), but when I created an attribute for pet, it doesn't show in the drop down list when I choose Attribute in the block.

Why is that so?

25
Ask a Question / How to use MathEasy distance extension block
« on: September 14, 2020, 08:39:59 am »
Hey, I tried using the MathEasy distance extension block to measure the distance between 2 actors. I'm trying to create a behavior that I can use across all the food, calculating the distance between Self and Pet. But when I select it, it only shows Actor and not the other attributes. How do I set the Actor to my pet so that it only interacts with the Pet and not other actors on screen?

I've also have a problem. When I release my mouse, the food kills itself even though its not near to the pet. Did I use the block wrongly?

26
Ask a Question / Re: Setting up a sensor
« on: September 11, 2020, 09:05:30 pm »
Thanks, I think your suggestion for distance really is better.

I tried using the MathEasy extension. I'm trying to create a behavior that I can use across all the food, where the distance between Self and Pet. But when I select it, it only shows Actor and not the other attributes. How do I set the Actor to my pet so that it only interacts with the Pet and not other actors on screen?

I've also have a problem. When I release my mouse, the food kills itself even though its not near to the pet. Did I use the block wrongly?

27
Ask a Question / Setting up a sensor
« on: September 11, 2020, 08:51:53 am »
Hi,

I want to create a behavior, where 1 actor's collision enters another actor's collision, this activates a sensor, deactivate when both actors no longer collide, and upon mouse release, triggers an event.

I notice a sensor block, but I don't know how to set it up. I also don't see any sensor under attributes.

Basically, I want to feed food to my pet and I'm using a drag and drop feature, where the food will be fed to the pet when dropped on the pet.

Thanks!

28
Ask a Question / Re: Drag and drop behaviour
« on: August 30, 2020, 06:51:11 am »
How do I do a drag and drop function?

29
Ask a Question / Drag and drop behaviour
« on: August 26, 2020, 06:46:45 am »
I'm trying to do a drag and drop function. I can set the item to follow the mouse position upon press. But how do I set it to the last location of mouse release? Which blocks do I use?

30
Ask a Question / Re: Character behavior
« on: August 07, 2020, 07:51:25 am »
Ah, i get it. No wonder it kept crashing. Now it doesn't crash. Learnt something about list, thank you so much!

Pages: 1 2 3 4 ... 19