Page 3 of 3

Re: Point and Click Game

PostPosted: Wed Sep 17, 2008 9:55 pm
by GuybrushThreepwood
RtMI.rar
Here it is so far
(17.19 MiB) Downloaded 151 times

Re: Point and Click Game

PostPosted: Wed Sep 17, 2008 11:39 pm
by BlarghNRawr
...
.rar?

Re: Point and Click Game

PostPosted: Thu Sep 18, 2008 12:40 am
by edh
Hmm. Well, you don't have any of the code I gave in my example in your example. Guess that's a big reason why it doesn't work.

I feel a little jerked around right now.

If you try to do it, and it doesn't work, I will try to help. I've already offered up a lot here. If you don't try to do it, and it doesn't work, you're on your own. I was expecting an example that only had one animation working correctly. This example doesn't do anything except move to, there is no script at all in there.

Re: Point and Click Game

PostPosted: Thu Sep 18, 2008 3:28 am
by GuybrushThreepwood
change the transparency of the actor Click

Sorry for all the trouble :oops:
+2 bonus points :D

Re: Point and Click Game

PostPosted: Thu Sep 18, 2008 4:20 am
by DilloDude
Add this to Global Code:
Code: Select all
typedef unsigned short int specAng;

specAng normToSpec(double angsize)
{
    return angsize * 182.04444444444444444444444444444;
}

double specToNorm(specAng angsize)
{
    return angsize * 0.0054931640625000000000000000000013;
}

double angWrap(double angsize)
{
    return specToNorm(normToSpec(angsize));
}

There are more functions in this set, but these are the only ones you'll need so far.

Then add a draw actor event on Guybrush, make it script editor and put
Code: Select all
if (directional_velocity > 0)
{
    int ang = angWrap(angle + 45) / 90;
    char dChar;
    char animName[17];
    switch(ang)
    {
        case 0: dChar = 'R'; break;
        case 1: dChar = 'B'; break;
        case 2: dChar = 'L'; break;
        case 3: dChar = 'F'; break;
    }
    sprintf(animName, "Guybrush RtMI %c1", dChar);
    if (animindex != getAnimIndex(animName))
    {
        ChangeAnimation("Event Actor", animName, FORWARD);
    }
}
else
{
    char animName[17];
    strcpy(animName, getAnimName(animindex));
    animName[15] = '2';
    ChangeAnimation("Event Actor", animName, FORWARD);
}

Re: Point and Click Game

PostPosted: Fri Sep 19, 2008 3:23 am
by GuybrushThreepwood
Thanks DilloDude :mrgreen:
+1 point :D

Re: Point and Click Game

PostPosted: Sun Oct 05, 2008 7:58 am
by smallville
the way that i would do animation i would type this code (probably won't work) :roll:
myactor>drawactor>script editor
Code: Select all

if (myactor.x>+)
ChangeAnimation("EVENTACTOR")("left");
if (myactor.x<-)
ChangeAnimation("EVENTACTOR")("right);
Code: Select all

and then do the same thing only with the Y axis
im not so good with the precision of these codes

Re: Point and Click Game

PostPosted: Sun Oct 05, 2008 3:21 pm
by BlarghNRawr
:D you have to put the code between the code brackets
Code: Select all
like this
:wink: