The Daily Click ::. Forums ::. Klik Coding Help ::. OMG!!! MUNSTAHZZ!!!!
 

Post Reply  Post Oekaki 
 

Posted By Message

zharkman



Registered
  01/03/2009
Points
  27
2nd March, 2009 at 03:05:33 -

ehem.. err sorry to ask you again guys.. i just startedon this products anyways
so, anyways, im using TGF2 and im trying to make a side scroller...i need some kind of guidance on this, i used to use rpgmaker xp and i got used to it, so, what im trying to figure out is this, is there a way to make an object move in a certain routine? lets say, make it move 2 times right then 2 to the left making it a loop, until i make it change, like.. if the player gets close to it, it changes its pattern into lock aiming onto player then starts attacking, because, i see the "movement" things, but, i dont see an option like that except for "path" but i do not know how to control it nor, if its what im looking for, do i make myself clear? maybe not... ummm give them their own "almost" ai, lets say.
if you got a tutorial on this, that is for TGF2 and not the old one (kuz it confuses me saying that it has extra options i do not see), that could help too

thnx in advance (i know its lots, but plz, bear with me T-T)

 
none

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
2nd March, 2009 at 03:38:17 -

You could use the path movement to make it move back and forth constantly, then make an event that checks the X positions and Y positions relative to the object, and if it gets too close, it changes movements (you can have multiple movements) to one that is a bouncing ball movement, and set it to move at a speed while always looking in the direction of the player.

Someone else needs to explain this better. I'm short on time.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

JustinC



Registered
  02/04/2006
Points
  1517

GOTM - MAY 2009 - 3RD PLACE!
2nd March, 2009 at 03:41:50 -

Umm. . . I think I get what you're saying. The simplest answer is....

Give it bouncy ball movement.

Always --- Add 1 to Object's Value A

If Value A = 50 --- Set Object's direction to Left

If Value A = 100 --- Set Object's direction to Right
Set Object's Value A to 0

You can change those numbers to make it move left or right longer. Now if you want it to change that routine I'd use a flag. Add the flag to those previous events and only allow them to happen if the flag is off. Now when something happens such as your character shooting the object, the object would come after you:

Bullet collides with Object --- Set Flag 0 of Object to ON

Flag 0 is ON --- Object always look in direction of player.

Hope that helped. . .

 
Image

zharkman



Registered
  01/03/2009
Points
  27
2nd March, 2009 at 04:26:22 -

hmmm i like the ideas, jet since i dunt understand much of what u guys are saying, ill tryin to find out but u do lead me to the answer tho for what i understand it could work, but idunno about the bouncy ball thing.. ill check, thnx guys (more possibilities accepted too )

 
none

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
2nd March, 2009 at 05:47:20 -

since mmf2 tgf2 is not for making a single style of game (ie grid based rpgs) it wont have that narrow of a movement. all the movements try to give you as much flexibility as possible. so you have to event your own if you want to get it like that. head in the directions above.

 
n/a

Mr G



Registered
  31/12/2008
Points
  178

VIP MemberPS3 OwnerI like Aliens!Attention GetterDos Rules!
2nd March, 2009 at 06:55:17 -

Or just check out the tutorial pack I uploaded on TDC see various styles of movement examples

 
Image

http://create-games.com/project.asp?id=1549

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
2nd March, 2009 at 08:51:38 -


1. Make Event Groupings for every movement
2. Flesh out movements in those groups with easy code
3. Activate the movement group you want it to use based upon location, enemies on screen, or whatever

e.g. 1) Attack group, Retreat group, Jump group, Dodge group
e.g. 2) *Repeat 35 times --> set x to x(char) + 1 *Repeat 25 times --> set y to y(char) + 1, set x to x(char) - 1
e.g. 3) enemy is facing hero and enemy is within range --> activate attack group

It might not be exact cause I have not played with AI much, nor have I tested this, but this would be my guess on how to solve your dilemma.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
2nd March, 2009 at 17:36:55 -


Originally Posted by MBK

1. Make Event Groupings for every movement
2. Flesh out movements in those groups with easy code
3. Activate the movement group you want it to use based upon location, enemies on screen, or whatever

e.g. 1) Attack group, Retreat group, Jump group, Dodge group
e.g. 2) *Repeat 35 times --> set x to x(char) + 1 *Repeat 25 times --> set y to y(char) + 1, set x to x(char) - 1
e.g. 3) enemy is facing hero and enemy is within range --> activate attack group

It might not be exact cause I have not played with AI much, nor have I tested this, but this would be my guess on how to solve your dilemma.


using groups for enemies like that might cause a few problems when dealing with multiple enemies, i find it easier to use an alterable value combined with groups, and make each condition in each group conditioned by that value equal to a certain value, and always make those groups active. you could problably use strings tooo...

@zharkman - id tell you where most of this stuff is, but i never used TGF2, only TGF1... but groups are in the event editor, you can put the code that you make in there into groups to better organize them and you can also activate and deactiveate them through the editor or using code. Alterable values are numbers that are stored into each active object that you can use for just about anything you can come up with in your head... most simply for keeping track of that actives ammunition or life, more commonly used as a countdown timer of sorts that can limit the active from producing an action that happens too often. (they are like variables in RPGMaker) they should be in some kind of property box, in MMF2 they are off to the side in a window thing, and the movements should be in there too. Flags are like triggers in RPGMaker, you can set them on or off, specifically to each active object. you can only control them through the event editor, and they range from 0 to idk. make sure you writedown in notepad or on something which ones you set for which. there are also alterable strings but i havent figured out how to use them properly yet, theyre in the same place as the alterable valuse. most importantly read the articles in the article section adn download that tutorial pack that mr green posted, that will get you started, and i know i started really fast but that was because i took the time to read everything i could before actually sitting down and doing something.

hope i helped a bit

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2976

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
2nd March, 2009 at 21:58:49 -

Shut up FOO's!
As I was saying, what you should do is read and follow the beginners tutorials included with all Klik-software, when you get the basics you can check out the vast article section here on TDC for making more advanced stuff.
But best start with basics.
I pity the FOO who doesn't start with the BA-SICS!
I pity the FOO...

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

zharkman



Registered
  01/03/2009
Points
  27
4th March, 2009 at 13:43:37 -

i actually did read the tutorial, it just didnt work for me in what im trying to do

 
none
   

Post Reply



 



Advertisement

Worth A Click