How do you mean presentation? I can make a ged of what you are asking for, if I could only understand what you are asking for. Originally it sounded like you were perhaps collecting 10 apples, but then it sounded like you were firing them. If you are firing them then at some point you have to set the number of apples to be 10. If there isn't a start to your game, use the view's create actor. For this code, you'll need to create a variable called apple_count.
view -> Create Actor -> Script Editor
- Code: Select all
apple_count=10;
This sets the total number of apples you can use, so keeping with the firing bullets idea, it sets your ammo. Now for the text display. It seems you already know how to make a text actor, so make one and give it the following script.
apple_display -> Draw Actor -> Script Editor
- Code: Select all
textNumber=apple_count;
This will have the text actor display apple_count, so if you haven't used any apples, it will show 10. The last bit of code has to do with you creating the apples. So I presume this is some mouse button down event, I'll call the actor apple_creator. What this actor will do is on mouse button down, allow the player to drag it around. When they let go, it will create an apple where it was and jump back to its original position, in this code it is (0,0).
apple_creator -> Mouse Button Down (Left) -> Script Editor
- Code: Select all
if(apple_count>0)
{
FollowMouse("Event Actor", BOTH_AXIS);
}
Now on its mouse button up event, have this. It again checks if there are apples to be had, and if so create an apple, reset the position, and decrease the total number of apples.
apple_creator -> Mouse Button Up (Left) -> Script Editor
- Code: Select all
if(apple_count>0)
{
CreateActor("apple", "apple_anim", "(none)", "(none)", 0, 0, false);
apple_count--;
FollowMouse("Event Actor", NONE_AXIS);
x=0;
y=0;
}
And that should do it. Assuming that is what you want, and you are still having trouble, I can make a ged of it. If this isn't what you meant, you'll have to try explaining it again, or provide the ged you've been working with. Maybe that way I'll understand what you are trying to explain a bit better.