# lord thoorin

Member Since 01 Jan 2011
Offline Last Active May 01 2012 11:24 AM

### Problem with enemy, again :-)

14 April 2012 - 12:19 PM

Hi, i have another problem with AI of enemy.
In obj_nepritel (enemy) create
```smer = "dolu"
rozdil_y = 0
rozdil_x = 0
```

In obj_nepritel step (obj_hrac = player)
```if obj_hrac.x > x{
if obj_hrac.y > y{
smer = "doprava_dolu"
}
}

if obj_hrac.x > x  {
if obj_hrac.y < y{
smer = "doprava_nahoru"
}
}

if obj_hrac.x < x {
if obj_hrac.y > y{
smer = "doleva_dolu"
}
}

if obj_hrac.x < x {
if obj_hrac.y < y{
smer = "doleva_nahoru"
}
}

if obj_hrac.x > x {
if rozdil_y < 4 { if rozdil_y > -4{
smer = "doprava"
}
}
}

if obj_hrac.x < x {
if rozdil_y < 4 { if rozdil_y > -4{
smer = "doleva"
}
}
}

if rozdil_x < 4 { if rozdil_x > -4{
if obj_hrac.y < y{
smer = "nahoru"
}
}
}

if rozdil_x < 4 { if rozdil_x > -4{
if obj_hrac.y > y{
smer = "dolu"
}
}
}

switch (smer){
case "doprava": sprite_index=spr_nepritel_doprava; x+=2; break;
case "doleva" : sprite_index=spr_nepritel_doleva;  x-=2; break;
case "nahoru" : sprite_index=spr_nepritel_nahoru;  y-=2; break;
case "dolu"   : sprite_index=spr_nepritel_dolu;    y+=2; break;
case "doprava_nahoru" : sprite_index=spr_nepritel_doprava_nahoru; y-=2 x+=2; break;
case "doprava_dolu"   : sprite_index=spr_nepritel_doprava_dolu;   y+=2 x+=2; break;
case "doleva_dolu"    : sprite_index=spr_nepritel_doleva_dolu;    y+=2 x-=2; break;
case "doleva_nahoru"  : sprite_index=spr_nepritel_doleva_nahoru;  y-=2 x-=2; break;
}

rozdil_y = obj_hrac.y - obj_nepritel.y
rozdil_x = obj_hrac.x - obj_nepritel.x
```
If i start the room, and if in the room is only 1 enemy, its alright. But when i put to the room more enemy then 1, it cause this
Sorry for my english.
Thank you.

### Graphic designer

03 March 2012 - 12:00 PM

Hello!
Looking for graphic designer for my game. This is a 2D RPG seen from above,
I am able to do basic inventory.
With the game still help me: Dominik Svatek, invent things in the game, helping us with the story, etc., Vaclav Spiral - Musician
What I expect: Obviously pixel art graphics, but am content with the other, mainly that it fit into the game.
You must send me your creation (still more) and have Skype (for comunication).
What I offer: a place in the credits, experience, and maybe even fun or if you had some problems with the GM so I will try to help.
Unfortunately, this is my first major project, so I can't show you some my finished game, because there is only one (TSO tests), but it did not stand for much and it's stored in the old PC (which does not work for some time), and Upload I think not too. But I can send some candidate materials for the game, but You do not have to worry that I dont finish the game, I love fantasy, especially fantasy RPG, and do such a fantasy RPG is my dream since I first opened Game Maker, now even though I still inexperienced beginner, I think I can finish this project to end.

Who would still be interested, here is the beginning of the story:
The story begins in a small village called "Bill's shoe." For several months, here are losing people, especially lone person, and mostly at night. Nobody, except perhaps the victims, know who abducts villagers, there were also stories of local drunks that the hijackers are rats walking on two legs, others say that it was goblins.
Your name is Aranos and live in a small shack, along with his older brother, working as an assistant in the field, wearing water for peasants and other small works, sometimes you're going to help your seriously ill father. Since the days when the villagers began to lose, you wanted to travel to
"Brock Farm" until when:

If you dont understand something, ask to me, and I try to repair it.

### problem with enemy

22 October 2011 - 09:10 AM

Hi again!
I have a problem with enemy. I want to do, when enemy is near to the player, enemy change his sprite to spr.enemy_attack_left or spr.enemy_attack_right. I have in my code this:
In step
```if(point_distance(x,y,obj_player.x,obj_player.y) <= 60){
if side = "left"{
alarm[1]= 10
alarm[0]= 50
}
if side = "right"{
alarm[1]= 10
alarm[0]= 50
}
}
```

In alarm[0]

```if side = "right"{
sprite_index=spr_enemy_rightstand}
if side = "left"{
sprite_index=spr_enemy_leftstand
}```

In alarm[1]

```if side = "left"{
sprite_index=spr_enemy_attack_left
}
if smer = "right"{
sprite_index=spr_enemy_attack_right
}```
But enemy dont do it!
Thank you

24 June 2011 - 03:35 PM

1)My first problem is, when I attack on obj_enemy its ok, if enemy have health lesser then 1 he die, but i have problem, if i am very near of obj_enemy_corpse and next to the me is obj_enemy and i attack to him, i still attack on obj_enemy_corpse not enemy    here is code
in Key press (SPACE)
```affected_enemy=instance_nearest(obj_player.x,obj_player.y,obj_enemy)

if affected_enemy.health > 1 {
if distance_to_point(obj_player.affected_enemy.x, obj_player.affected_enemy.y) < 20 {
alarm[2]=10
}
}
```
and alarm[2]
```affected_enemy.health-=10
```
I have two objects for enemy, obj_enemy and obj_enemy_corpse, obj_enemy_corpse has got parent on obj_enemy

2)And my second problem is, if i push it, show inventar, and I want to click on wooden_sword in inventar I try this thus
in draw
```if (mouse_check_button_pressed(mb_left))
{
if (mouse_x > view_xview[0] + 100 &&
mouse_x < view_xview[0] + (100 + 100)&&
mouse_y > view_xview[0] + (15 * i) &&
mouse_y < view_xview[0] + (15 *(i+1)))
{
switch (global.inv[i])
{
case "wooden sword":
if global.textweapon = "---(weapon)"{
global.textweapon = "wooden sword(weapon)";
global.inv[i] = "nothing";
}
break;
}
}
}
}
```
and I click almost all the screen but nothing

Thank you

### I need graphic for RPG

09 March 2011 - 11:15 AM

hi, i have started making 2D RPG and I need Graphic, the game will be seen from the top.
Offer playe in credits, perhaps any bonus in game , perhaps ideal graphics is pixel art, but i accept anyone
thanks, i hope you understand i dont speak engish so well