Total beginner here for CF2.5. I'm working through this Tank Game tutorial, and I'm failing at step 2 because what I think the tutorial is telling me to do just isn't available as an option in the software.
Tutorial: Please login to see this link.
I'm at this point in the instructions:
QuoteDisplay MoreThen add the following code in the Event Editor (get to this via View > Event Editor):
+ Always
- [P1Body] Set DistanceToMouse to:
Distance("Advanced Direction Object", X("P1Body"), Y("P1Body"), XMouse, YMouse)
- [P1Body] Set AngleToMouse to:
Direction("Advanced Direction Object", X("P1Body"), Y("P1Body"), XMouse, YMouse)
- [P1Turret] Set position at (0,0) from P1Body
- [P1Turret] Set Angle To AngleToMouse("P1Body")
- [Crosshair] Set X Coordinate to XMouse
- [Crosshair] Set Y Coordinate to YMouse
However, It's not very clear how I'm supposed to add this when CF2.5 complains that the following line has "Mixed strings and numbers" and won't let me "OK" it.
QuoteDistance("Advanced Direction Object", X("P1Body"), Y("P1Body"), XMouse, YMouse)
Further, the tutorial doesn't explain how to add the subsequent code to the other objects.
I understand that many tutorials assume some ladder knowledge in the one following it. I've successfully built basic platformers, done the Chocobreak game, and they all work fine.
Where I am struggling is understanding how in CF2.5 to do what the tutorial instructs when it says "add the following code in the Event Editor". Where should I add it specifically? Why is the code not accepted?
This is what I have got, but it rejects the code as "Mixed strings and numbers." What am I doing wrong? Thank you for taking time to help.
Please login to see this attachment.