Page 1 of 1
Point and click example
Posted:
Tue May 17, 2011 9:21 pm
by Imperialjester
Hello, i have seen on the forums that some people are having trouble with point and click games. my next game im going to make has point and click so i thought i would share.
If you like it please give me a +1.
Re: Point and click example
Posted:
Wed May 18, 2011 5:47 pm
by SuperSonic
Nice, I like this a lot
+ point
Re: Point and click example
Posted:
Wed May 18, 2011 8:11 pm
by Imperialjester
thank you, i am also working on one that doesnt use moveto. moveto seems to have alot of bugs in it =/
Re: Point and click example
Posted:
Thu May 19, 2011 12:42 am
by skydereign
Yeah, MoveTo is really nice for simple things, and I love the avoid feature, but is generally unusable in more complex games. Apalia originally used MoveTo, but due to the teleportation glitches was replaced by my own moveto functions.
Re: Point and click example
Posted:
Thu May 19, 2011 1:47 am
by Imperialjester
can you post your own moveto code? im having a hard time figuring it out.
Re: Point and click example
Posted:
Thu May 19, 2011 2:15 am
by skydereign
Sure, here is a quick version of it. The code was quite specialized to the ai system I used in apalia, so this is a slightly broader version, but allows the user to overcome some of MoveTo's bugs. Pretty simple, uses activation events for MoveFinish, but I didn't add precise movement (again due to how I was using it in apalia), but it is accurate to one frame's distance.
Re: Point and click example
Posted:
Thu May 19, 2011 2:19 am
by Imperialjester
thank you +1.
Re: Point and click example
Posted:
Thu May 19, 2011 3:06 pm
by Imperialjester
is is it posible to use "Event Actor" as the relative actor?
Re: Point and click example
Posted:
Thu May 19, 2011 9:49 pm
by skydereign
I didn't make it do that, but it'd be pretty easy. The thing is you'd have to use strcmp in the function as getclone does not support "Event Actor", and the other const strings. You'd add something like this to the beginning.
- Code: Select all
if(strcmp("Event Actor, relativeTo)==0)
{
relActor=getclone(clonename);
}
else if(strcmp("Parent Actor", relativeTo)==0)
{ // should have a check to see if parent exists
relActor=&parent;
}
// etc...
That way the Actor* for relActor can use "Event Actor", and the others.
Re: Point and click example
Posted:
Thu May 19, 2011 10:55 pm
by Imperialjester
okay thank you.