Help Me please?!?

Talk about making games.

Help Me please?!?

Postby dyronl » Wed May 12, 2010 7:00 pm

Can you help me? I am attempting to create an RPG. I am an extreme script editing novice however. :cry: I am attempting to create an "attack box" that when the main character enters, the enemy will go towards it. If someone can help me, I would be immensely grateful :mrgreen:
dyronl
 
Posts: 6
Joined: Wed May 12, 2010 6:37 pm
Score: 0 Give a positive score

Re: Help Me please?!?

Postby Hblade » Wed May 12, 2010 8:47 pm

This is a bit advanced, maybe Tutochao's Tutorials can help. It's in general :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Help Me please?!?

Postby krenisis » Wed May 12, 2010 8:50 pm

Ok for a beginner an RPG will be very difficult. Follow this an tell me if the effect is what you want.
1) Click on the enemy
2)Click on events / then click on draw actor .
3) Click on action / click on script editor .
4) Now this is the part where you need to focus....Click on variables it should be towards the bottom of screen.
5) Click on the variable / MoveTo / and a box will appear.
6) In the box it will say event actor leave that alone...next it will say relative to ....you click on that and choose the box actor...where it says the 1 erase that and put 5 .
Ok now that should work , please respond after you have done it and give me feedback.
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: Help Me please?!?

Postby dyronl » Fri May 14, 2010 7:27 pm

Ok thank you for your answer but this only caused the enemy to move to the edge of the attack box, apparently trying to escape as it rammed repeatedly against the side. My "attack box" is a filled region, could this be part of the problem?
dyronl
 
Posts: 6
Joined: Wed May 12, 2010 6:37 pm
Score: 0 Give a positive score

Re: Help Me please?!?

Postby krenisis » Fri May 14, 2010 9:36 pm

Ok try this
1) make the box smaller
2) Instead of filled use wire frame region
Tell me how this works out.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: Help Me please?!?

Postby krenisis » Fri May 14, 2010 9:39 pm

Or if those 2 dont work just make a regular actor and set the transparency to 0. That will work but after you place it you wont be able to see it so just plan ahead where you want to place it. I listed 3 methods depending on what you want to do.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: Help Me please?!?

Postby lcl » Sat May 15, 2010 7:35 pm

If I understood you right, you are trying to make enemy go towards the main character, like attacking?
I think this will be easy to do with some easy script.

First make variable "move_enemy".

Player -> Collision -> Any side -> Attack Box -> Script Editor
Code: Select all
move_enemy = 1;


And then in Enemy -> Draw Actor -> Script Editor
if (move_enemy == 1)
{
//Add there that Move To function with clicking variables -> Move To -> Event Actor -> Relative to: Player -> velocity: 5
}
Hopefully this helps you! :D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Help Me please?!?

Postby dyronl » Tue May 18, 2010 7:28 pm

Icl yours worked great! the onluy problem is that it attacks even when the player is no where near the attack box, as soon as the game starts actually.
dyronl
 
Posts: 6
Joined: Wed May 12, 2010 6:37 pm
Score: 0 Give a positive score

Re: Help Me please?!?

Postby Hblade » Tue May 18, 2010 11:25 pm

Make sure you have 2 = signs :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Help Me please?!?

Postby dyronl » Wed May 26, 2010 7:24 pm

adde the secon = now it just circles the box and doesn't actually follow the player at any point :|
dyronl
 
Posts: 6
Joined: Wed May 12, 2010 6:37 pm
Score: 0 Give a positive score

Re: Help Me please?!?

Postby edwardfanboy » Wed May 26, 2010 10:54 pm

krenisis wrote:Or if those 2 dont work just make a regular actor and set the transparency to 0. That will work but after you place it you wont be able to see it so just plan ahead where you want to place it. I listed 3 methods depending on what you want to do.


Setting the transparency to 0 will make all collision events stop working.
Best set the transparency to something small but not 0.
Code: Select all
10 PRINT"Hello World
20 GOTO 10
edwardfanboy
 
Posts: 40
Joined: Sat Jun 20, 2009 2:38 am
Location: Nowhere
Score: 3 Give a positive score

Re: Help Me please?!?

Postby DST » Thu May 27, 2010 1:13 am

If you want something to collide yet be invisible, leave the transparency at 0 and instead use
VisibilityState("Event Actor", DONT_DRAW_ONLY);

That's what VisibilityState() is for - not drawing it at all, but still allowing it to have the full range of functions.

This is better because it will not render the actor, whereas if you have a transp of .99 the actor will still render. It may be invisible to you, because of your monitor settings, but someone with a good monitor will still see it faintly.

There is a huge difference between invisible and .99 transp on a good monitor. Especially against solid colors, and especially against black.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Help Me please?!?

Postby dyronl » Wed Jun 02, 2010 6:56 pm

DST thanks alote ! :)) that info was very useful as I now have invisible walls which is very good ((:

Icl it'd help lots if you could get back to me, because except for the one error yours seemed to work best, in the mean time I will be trying the last method of Kren and seeing if it worked since the others didn't do much

again, thank you everyone you have been very helpful :D
dyronl
 
Posts: 6
Joined: Wed May 12, 2010 6:37 pm
Score: 0 Give a positive score

Re: Help Me please?!?

Postby lcl » Fri Jun 04, 2010 12:21 pm

Here is example for you, dyronl! :D That allows you make many attacking enemies, without that all the enemies would attack same time... :D
Note that "move_enemy" variable is actor variable, not global. This way every one of the enemies can have own value for it. :D
Attachments
Example.zip
(5.38 KiB) Downloaded 73 times
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Help Me please?!?

Postby dyronl » Fri Jun 04, 2010 6:41 pm

Thanks man that's awesome, I was worried about creating multiple enimies :)

What about a deactivation zone? do you think I could make, say, four small wire frames around the area I want the player chased and set a colision event to set move_to to 0 and then set a script that has the enimies move back to their area ? or would all the enimies swarm the one return area?
dyronl
 
Posts: 6
Joined: Wed May 12, 2010 6:37 pm
Score: 0 Give a positive score

Next

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest