Score number as event activator

Non-platform specific questions.

Postby Diana Kennedy » Tue May 30, 2006 4:28 pm

Okay, now that I used JUST the concerned actors, without any others, it worked. So the problem must be in the additional elements. I guess it is the rider. Indeed, I tried out 2 different kinds of code to make him move forward.

On the rider, draw actor:
Code: Select all
x = x - 5;
then I maked the rider parent of the view, so the view followed the rider. The problem was to bring back the view to the initial position, to where the gameover / swampintro actor is displayed. So I added to the gametime timer the code:
Code: Select all
view. x = -490;
view.y = -400;



And it did not work.

The other thin I tried was to make the ground moving by adding to its draw acor event:

Code: Select all
x = x + 5;


This way, the view remained where it was and only the ground moved, giving the illusion we follow the rider on his course.

It did not work either. There must be a thing I missed to do in either both or one of these solutions. It may be also be realted to the fact, that the rider actor is replaced by the jumping rider actor several times durung game?
[/quote]
User avatar
Diana Kennedy
 
Posts: 257
Joined: Wed Dec 07, 2005 12:34 am
Location: France, where Presidents who got shot in Texas do exile ;-)
Score: 0 Give a positive score

Postby Just4Fun » Wed May 31, 2006 1:27 am

Hi Diana,

I am not too sure whether my attempt at help will actually confuse you all the more, but I will give it a shot.

I wonder, could you move your gameover/intro code into your 'score' actor -->drawActor-->script editor? That is, get the code outside of the 'timer' or 'rider' actor (if that is where you now have it). Then use your timer or a variable, say, 'scoreNum' to track the score within the score actor. Something like:

if (score>=130){
DestroyActor("rider");
CreateActor("swampintro", "introswampy", "no parent", "no path", 0, 14, false);
{
else if (score<130){
DestroyActor("swampintro");
CreateActor("gameover", "icon", "gameover", "no path", -28, -22, false)
}

What I am trying to get at here is destroying the actor that you think is causing the problems prior to creating your 'gameover'. That way, maybe you will eliminate the conflicting coordinates code.

Personally, I prefer using GE's Activation Areas for this kind of thing because all I have to do is create my splash screen and then move the view to it. When you move to an Activation Area, the previous area is automatically destroyed until you move back to it. You can also do this when moving to different levels in a game, but then, I don't like text coding much anyway and Activation Areas keep me free of chasing anymore coding errors than I already have to chase! :wink: HTHs
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby Diana Kennedy » Wed May 31, 2006 7:26 pm

Thank you very much Just4fun. This looks very promising. Actually I resolved the problem by just uing a clumsy path ;)
But I will try opit your solution in a separate project to see how it works! Thank you very much! 8) 8)
User avatar
Diana Kennedy
 
Posts: 257
Joined: Wed Dec 07, 2005 12:34 am
Location: France, where Presidents who got shot in Texas do exile ;-)
Score: 0 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest