Page 4 of 6

Re: The Games I Am Working On

PostPosted: Sun Feb 08, 2009 3:07 pm
by jimmynewguy
sky, thats a great way to make npc's! It looks natural :D

Re: The Games I Am Working On

PostPosted: Mon Feb 09, 2009 9:04 pm
by mrgame
i see your idea :P using basically a timer to make them turn over and over again. this would be so simple :P just one code and all the npcs would be done. if i can not do what i have planned i shall use this if it is ok. i was thinking of working on a full out npc system though. since i am doing a full save and load system and 3d / isometric thing it would just ruin it all if the npcs arnt the same :P so im gonna make the npcs react to the surroundings and player.

eg they will move out the way of the player. will turn if they get near walls ect and have random points they are set to go to and will find there way around the objects around them. sound good?

anyway as animations are consered just the left right down and up animations for each npc is all thats needed now :P attacking npcs i will sort out later.

are these knights for the game?

Re: The Games I Am Working On

PostPosted: Tue Feb 10, 2009 1:48 am
by skydereign
The knights are yours, if you'll take them. You could have the npcs react through this method or even develop a subfunction to handle the differences and reactions for each npc depending on its surroundings, but since you seem to have a method already thought out, go ahead.

Re: The Games I Am Working On

PostPosted: Wed Feb 18, 2009 9:26 am
by MrJolteon
You need game music?
I have 2 songs I made on my phone.
Here:
Rick In Sunsville: Hometown happy
In the worlds portal(Just gave it a name): Hometown sad

Re: The Games I Am Working On

PostPosted: Thu Feb 19, 2009 10:05 am
by MrJolteon
mrgame wrote:Almost forgot.

i am using anti moonwalk in my game but i as you can guess i do it a simple way. i have noticed in some peoples games they are using a code that makes there caracter walk a little bit when they press say right. so they press right and it walks for a second or 2 even when you let go. why would you want that? it just lets people glitch into walls unless you then use the code ive seen about that stops you walking through things .

anyway

put these in the keydowns for the actor you dont want to moon walk

Code: Select all
Keydown up
direct = 1;

Code: Select all
keydown right
direct = 2;

Code: Select all
keydown down
direct = 3;

Code: Select all
keydown left
direct = 4;


and now in the draw actor of the same actor

Code: Select all
{
ChangeAnimation("Event Actor", "ups", NO_CHANGE);
actor.y = actort.y - 5;
}
if (direct == 2)
{
ChangeAnimation("Event Actor", "right", NO_CHANGE);
actor.x=actor.x + 5;
}
if (direct == 3)
{
ChangeAnimation("Event Actor", "downs", NO_CHANGE);
actor.y = actor.y + 5;
}
if (direct == 4)
{
ChangeAnimation("Event Actor", "left", NO_CHANGE);

actor.x = actor.x - 5;
}
if (direct == 0)
{
    ChangeAnimationDirection("Event Actor", STOPPED);
    animpos = 0;
}


Now you change actor to the name of your actor.

now that this does is the movement and the changing of the animation are set to a variable not a keydown. and they are both set to the same variable.

so looking right and going right can not be apart. if one is on the other one has to be. this way if you press both up and right. the actory will look and go either up or right. depending on what was pressed first.

a non flawable anty moon walk code using only if :)

It doesn't work for me... :(
When I press the up-key, the player keeps moving up forever... :(
The animations got frozen at the first frame after trying to fix it... :cry:

Re: The Games I Am Working On

PostPosted: Thu Feb 19, 2009 10:11 am
by skydereign
Do you have a keyup event that sets it to 0? That was not mentioned directly but implied. Upon the keyup of those keys, set direct equal to 0.

Re: The Games I Am Working On

PostPosted: Thu Feb 19, 2009 10:43 am
by MrJolteon
yes

Re: The Games I Am Working On

PostPosted: Thu Feb 19, 2009 10:45 am
by skydereign
Did you just copy the code? Because it is partially wrong. It is missing the if direct is equal to one.
Code: Select all
    if (direct==1)   
    {
    ChangeAnimation("Event Actor", "ups", NO_CHANGE);
    actor.y = actort.y - 5;
    }
    if (direct == 2)
    {
    ChangeAnimation("Event Actor", "right", NO_CHANGE);
    actor.x=actor.x + 5;
    }
    if (direct == 3)
    {
    ChangeAnimation("Event Actor", "downs", NO_CHANGE);
    actor.y = actor.y + 5;
    }
    if (direct == 4)
    {
    ChangeAnimation("Event Actor", "left", NO_CHANGE);

    actor.x = actor.x - 5;
    }
    if (direct == 0)
    {
        ChangeAnimationDirection("Event Actor", STOPPED);
        animpos = 0;
    }

Re: The Games I Am Working On

PostPosted: Fri Feb 20, 2009 6:24 am
by MrJolteon
I added the
Code: Select all
if(direct = 1)
code myself.

Re: The Games I Am Working On

PostPosted: Sun Feb 22, 2009 9:13 am
by MrJolteon
okay. i'll post it on my site(as always)
Download it here: http://jolteongames.freeforums.org/down ... e.php?id=6

Re: The Games I Am Working On

PostPosted: Sun Feb 22, 2009 9:16 am
by MrJolteon
The code I used was like this:
Code: Select all
    if (direct==1)   
    {
    ChangeAnimation("Event Actor", "walkup", NO_CHANGE);
    actor.y = actort.y - 5;
    }
    if (direct == 2)
    {
    ChangeAnimation("Event Actor", "walkright", NO_CHANGE);
    actor.x=actor.x + 5;
    }
    if (direct == 3)
    {
    ChangeAnimation("Event Actor", "walkdown", NO_CHANGE);
    actor.y = actor.y + 5;
    }
    if (direct == 4)
    {
    ChangeAnimation("Event Actor", "walkleft", NO_CHANGE);

    actor.x = actor.x - 5;
    }
    if (direct == 0)
    {
        ChangeAnimationDirection("Event Actor", STOPPED);
        animpos = 0;
    }
I made it like that because the animations names are like that.

Re: The Games I Am Working On

PostPosted: Sun Feb 22, 2009 9:55 am
by skydereign
Yeah, part of the code was left out...
Code: Select all
    if (direct==1)   
    {
    ChangeAnimationDirection("Event Actor", FORWARD);
    ChangeAnimation("Event Actor", "walkup", NO_CHANGE);
    actor.y = actor.y - 5;
    }
    if (direct == 2)
    {
    ChangeAnimationDirection("Event Actor", FORWARD);
    ChangeAnimation("Event Actor", "walkright", NO_CHANGE);
    actor.x=actor.x + 5;
    }
    if (direct == 3)
    {
    ChangeAnimationDirection("Event Actor", FORWARD);
    ChangeAnimation("Event Actor", "walkdown", NO_CHANGE);
    actor.y = actor.y + 5;
    }
    if (direct == 4)
    {
    ChangeAnimationDirection("Event Actor", FORWARD);
    ChangeAnimation("Event Actor", "walkleft", NO_CHANGE);
    actor.x = actor.x - 5;
    }
    if (direct == 0)
    {
        ChangeAnimationDirection("Event Actor", STOPPED);
        animpos = 0;
    }

Direct needs to reinitialize animation. So adding the change should do it.

Re: The Games I Am Working On

PostPosted: Tue Feb 24, 2009 7:45 pm
by mrgame
omg now i see all the mistakes i made wiriting that down :P ye the if (direct == 1 ) should be at the top ill change that now

you see where you have added the ChangeAnimationDirection("Event Actor", FORWARD);
this should be in another keydown event on any of the movment keys now in the script editor with the rest. that was it will only change forward once and not over and over again. apart from that just follow what sky did


Sorry i have been very busy with other things lately but now i am back working on aztecs so ye about the drawings

other terrains and buildings will be great. i want to build the city now. so anything that will go in a city. buildings, crates, barrels, markets, npcs. anything really :P

oo and a stray dog npc for that top effect :P - ( a cute stray dog ) you know looks cute but you can tell its a stray :P

Re: The Games I Am Working On

PostPosted: Thu Feb 26, 2009 1:56 am
by skydereign
I'm not especially good with animals, but I think this is pretty good. I can also have other animations, such as sitting, running, barking, and other if you want... Not sure on how in depth you are making the dog. This is just walking around.

Re: The Games I Am Working On

PostPosted: Fri Feb 27, 2009 4:41 pm
by mrgame
sitting and barking would be great :P

are you gonna redo the wooden fence and grass floor tile so they look more like your style?

some more houses would be great aswell

ooo and some flower beds to place about.

ive almost done the ai system. teaching them how to chase the player now. they know what options they have if they hit a wall, they know eg, they hit the left side of a wall they know they can go right, up or down. and then pick one randomly ect. i will post everything i have done with the ai's for people to view if they wish