Is it possible to code this?
-
I want to code this mechanic from terraria with the illusions but I don’t know if its possible, or something I just need some tips, please. my project btw: https://play.creaticode.com/projects/6789294c9d4344c8ce37e611
2:45 for timestamp
-
@blujey1294-328b9bc4 you can try this logic:
Create 3 clones
each clone has a unique id (for complex and less repeated you can try something like -+ ± and --, for each axis and diagonal)
handle each clone id under three if else statements
have two variables for the original sprites x and y, and the players x and y
each clone does the following:
subtract the sprites x and y variables from the players x and y variables
then for each individual clone:
-the first clone multiples the x by -1 and doesn’t touch the y
-the second clone doesn’t touch the x and multiplies the y by -1
-the third clone multiples both the x and y by -1
the players x and y are added back
each clone goes to these final resultsBasically this reflects the x and y across the corresponding axises for each clone, treating the player x and y as the origin point
I can make an example set of operator blocks to show how to do all this math
-
I’m really bad at coding those things but thank you so much for the tips, i would like an example
-
@blujey1294-328b9bc4 This should work (I haven’t tested but it should), the letter 5 and 6 of clone id are for the - and + symbols, and the dupe prefix is to make it different from other clones
edit: that go to should be in a forever loop*, and you can add a ghost effect based on boss health
-
@tyller_ tysm
-
@tyller_ I followed the instructions to a T, but I don’t know how to actually make the variables do something, as they aren’t registering as anything and it makes the brain go to 0,0?
-
@blujey1294-328b9bc4 you have to do forever loops so the x and y variable places are set to the brains x and y, and the PlayerX and PlayerY are set to the x and y of the player in a forever loop. I can make an example if necessary
-
@tyller_ please do!
-
-
@tyller_ thanks!!!