Page 1 of 1

String

PostPosted: Fri Jun 11, 2004 4:32 pm
by ingsan
:oops: I have a little string problem :oops:

On runtime (on CreateEvent on any actor), I have a string called Stop.
On Collision of Follow_mouse (actor that follows mouse) with actor L_screen, I have string named Left.
On Collision Finish, Script :
    !Left;
On Collision of Follow_mouse (actor that follows mouse) with actor R_screen, I have string named Right.
On Collsion Finish, Script :
    !Right;
Then, on any actor :
    if ( Stop ) view.x = view.x ;
    if ( Left ) view.x --;
    if ( Right ) view.x ++;


Aim : When I place mouse on L_screen, the view moves right. When I place mouse on R_screen, the view moves left.

But I can get no success :cry:
And when I remove this line from my code if ( Stop ) view.x = view.x ; the view moves Right, as if it was reading this first line if ( Left ) view.x --; without considering my collision conditions :?

Could someone help me ? Please ? :(

PostPosted: Fri Jun 11, 2004 8:06 pm
by jazz_e_bob
I want to help, but first, some questions:

There is some C shorthand here:

if ( Stop ) view.x = view.x ;

Is this the same as if ( Stop == 1 ) view.x = view.x ; ?

Also:

!Left;

What does this do?

A.

Image

PostPosted: Fri Jun 11, 2004 9:00 pm
by ingsan
Hi Jazz, how are you my friend ? :P

It's the first time I'm using Strings, following the precious advice you gave me in this post :
http://www.game-editor.com/forum/viewtopic.php?t=326 and maybe I'm not totally right with the code I wrote.

For me, a string is like an integer variable, but you do not have to put "==1" to call it.
For string Stop, it's just the same as int Stop == 1;

And !Left, does this not mean "Different from Left" ?

See you very soon 8)
I.

PostPosted: Sat Jun 12, 2004 4:28 am
by jazz_e_bob
I made a demo. No strings attached.

http://www.maybanana.com/pantzboi/game_editor/screenscroller.zip

Image

Also see:

http://www.iota-six.co.uk/c/g4_strcpy_strncpy_strcmp.asp

For more stuff on how to use strings. You cannot treat them like integers.

PostPosted: Sun Jun 13, 2004 11:55 am
by ingsan
This site is so cool ! I'm learning new things :oops: Thanks, man :wink:
I got to tell you also how amazing you are when you come out with so clear solutions concerning EVERYTHING ! I'm talking of the little tutorial you post. Sometimes I tell myself that I should STOP thinking too much and look just beneath my nose to see the solution that is right in front of me :oops:
Hey, I forgot to tell you that MicroFooty is back in the move ... :wink: So see you very soon !!!

I.

PostPosted: Sun Jun 13, 2004 12:06 pm
by jazz_e_bob
I have been doing work on microFooty AI system. A bit tricky but I am getting good results. I am SO happy with the graphics so far. :-)

The new GE has been brilliant too. Not a single crash since I have been using it. Nice and stable. Love it!

I hope you are well. xxx ooo

A.

PostPosted: Sun Jun 13, 2004 7:11 pm
by makslane
When the microFooty will be published? :D

PostPosted: Sun Jun 13, 2004 9:38 pm
by jazz_e_bob
Hmmm

Couple of months perhaps. ( Depends on how much time I can spend coding. :wink: )

:)

Image

Image

PostPosted: Mon Jun 14, 2004 12:56 pm
by makslane
good