Shows the Creaticode screen when I place DJ in -- "goofy Tower Defense test room"
-
What’s the project URL?
-
-
@info-creaticode Nevermind I fixed it
-
@info-creaticode Can you help me with making the units face the first enemy they see? They target the fastest right now because all I know how to do is target a specific unit, and if they kill that one they target a certain other, and so on and so forth
-
Can you define what’s the “first” target? Do you want it to lock at the most front-running target? Or the one with the earliest born time?
In general, you should not use the “point towards [sprite]” block in this case. Instead, you can try to compare all the targets based on your rule, and find out which target is the one you want to point at, then you can save its x/y positions into 2 variables.
Then, in the gun sprite, use the point towards x y in N seconds block.
-
@info-creaticode I mean the one that is ahead of the other enemies, and if there if one that gets ahead of the one that used to be in front, that enemy will become the “first” enemy
-
In that case, you will need to write some code to check which target sprite is currently the first. One way to do it is to look at how far it has traveled. Since every target starts at the same point, the one that has traveled the most should be the leading one, right?
And assuming each target has a constant speed, you just need to multiply its speed with how long it has been moving to get its total travel distance. The one target with the longest travel distance must be the leading one.
-
@info-creaticode So what I’m getting in simple words is, {enemySpeed}*{timeOnField}={totalDistance}, find the enemy with the highest total distance, and point towards that enemy?
If so, would you then put to variables labeled {firstX} and {firstY}, and use those as the direction the units need to aim?
-
-
@info-creaticode Will each sprite require their own variables or can you edit them to where {enemySpeed} and {TimeOnField} can affect individual enemies?
-
There are many ways to do this. For example, you can use a table or list to store all the speed and start time of all sprites.
This might be a good time to ask XO for specific coding suggestions.
-
@info-creaticode I’ve tried, but it doesn’t appear when I ask it something. I’ve tried debugging and restarting the chat but it doesn’t work
-
That’s strange. Are you trying at school? It might be blocked. Can you share a screenshot?
-
@info-creaticode
I typed in "how do you make variable on only 1 sprite, and it didn’t show -
Thank you. We will investigate why this is happening.
-
This issue has been fixed. You should be able to use XO now.
-
@info-creaticode It still shows the same issue, it might not be fixed because i’m editing the same game I found the bug in, but I’m not sure.
Or it just only occurs to me
-
Can you post the project link? Also, have you reloaded the page? It will need a reload to pick up the changes.
-
-
I get no issue now. Can you reload the browser page and try again? If it is not working, please paste a screenshot again. Thanks
-
@info-creaticode
I have problems with XO too on the same project, but only when I see inside.
See Inside:
Remix:
-
Thank you. We’ll look into this new error.
-
Actually, XO only works when you are logged in. Can you verify you are logged in when you get the error message?
-
@info-creaticode
I was logged in as shown in the screenshots.
When I clicked see inside logged out, XO doesn’t pop up. -
@info-creaticode It also happens every time I load a new project
-
Can you please reload the page, and make sure you are logged in, and then try XO again? We have made some improvement to XO, but we are not sure if they would resolve your specific issue. Thanks