100 points

Talk about making games.

100 points

Postby The achievement » Sun Mar 26, 2006 1:29 am

Say when i get to a hundred points right, how can i make it say a sentence?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby makslane » Sun Mar 26, 2006 1:37 am

Some thin like this:

if(score >= 100)
{
Create your text actor here
}

Look the Checkers demo:
http://game-editor.com/games/checkers.zip
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby The achievement » Sun Mar 26, 2006 1:44 am

ya its not working i dont know
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby makslane » Sun Mar 26, 2006 4:20 am

What's the problem?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby The achievement » Mon Mar 27, 2006 5:06 pm

hey makslane or novice, so do i go to my score actor and right click on him, then where do i go? i know i have to go to script editor, then when im done writing the script i know i go to creat actor (my text actor)

so what do i do first?? on my score actor?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby frodo » Mon Mar 27, 2006 5:31 pm

in draw actor do:


if(textNumber<100
{
strcpy...
}




I hope this was helpful.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Postby The achievement » Mon Mar 27, 2006 7:37 pm

what does the strcpy mean in this code?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Novice » Mon Mar 27, 2006 9:37 pm

Right click on your actor-->Draw Actor-->Script Editor
in script editor put this code
Code: Select all
if ([replace this with your score variable name]==100)
{
Create Actor ([your text actor name], ....
}

this is pseudo code so use the Create actor function in the script editor and select your actor.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby frodo » Mon Mar 27, 2006 9:51 pm

ok, the strcpy was probably kinda confusing. here is a different way to do it:

if(textNumber<100)
{
createactor...
}

hope that was better.
Last edited by frodo on Tue Mar 28, 2006 5:17 am, edited 1 time in total.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Postby The achievement » Mon Mar 27, 2006 10:15 pm

you see my sentece shows up right in the begging of the game, i want it to show up when i reach 100!
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Novice » Mon Mar 27, 2006 10:58 pm

You have to set the create at startup option to no for the text actor.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby The achievement » Tue Mar 28, 2006 1:15 am

Eh.. i dont know what im doing wrong, its still showing up at the begging im doing what you said draw actor.
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby frodo » Tue Mar 28, 2006 4:51 pm

well I put together a little game that is like you want, but it dosn't want to upload. so here is how to do it: (I told you wrong last time!)


if(score.textNumber>100)creat actor("text"...);


You have to include the name of your score actor before you type "textNumber".

Try that.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest