Point and Click Game

You must understand the Game Editor concepts, before post here.

Re: Point and Click Game

Postby GuybrushThreepwood » Wed Sep 17, 2008 9:55 pm

RtMI.rar
Here it is so far
(17.19 MiB) Downloaded 151 times
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Point and Click Game

Postby BlarghNRawr » Wed Sep 17, 2008 11:39 pm

...
.rar?
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: Point and Click Game

Postby edh » Thu Sep 18, 2008 12:40 am

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.
User avatar
edh
 
Posts: 233
Joined: Thu Sep 13, 2007 12:17 am
Location: Maine, USA
Score: 14 Give a positive score

Re: Point and Click Game

Postby GuybrushThreepwood » Thu Sep 18, 2008 3:28 am

change the transparency of the actor Click

Sorry for all the trouble :oops:
+2 bonus points :D
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Point and Click Game

Postby DilloDude » Thu Sep 18, 2008 4:20 am

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);
}
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: Point and Click Game

Postby GuybrushThreepwood » Fri Sep 19, 2008 3:23 am

Thanks DilloDude :mrgreen:
+1 point :D
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Point and Click Game

Postby smallville » Sun Oct 05, 2008 7:58 am

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
ReDgame 2009
current projects:
S.W.A.T: a shooter/ freeroamer (sort of) with a unique story and a TWIST
User avatar
smallville
 
Posts: 54
Joined: Mon May 05, 2008 9:05 am
Location: Location: Location: Location: location: Loca....
Score: 3 Give a positive score

Re: Point and Click Game

Postby BlarghNRawr » Sun Oct 05, 2008 3:21 pm

:D you have to put the code between the code brackets
Code: Select all
like this
:wink:
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Previous

Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest