X
xPeSaDeLoHx
Guest
Hello from YoYoGames! I'm developing an RPG-style game and I need your help for some systems if they can help!
Note: (I will put the taxpayer credits in the game).
I need a system for multiplayer: I found several, but it's been a while since I moved GM: s 1.4, I ended up forgetting many things. And I'd like some help or even a tutorial I can put into the game.
Type: I put a screen for character selection where there is the 'global.class' variable that consists of the 'Wizard, Archer and Guard'. I would like the client to send this variable to the server, send all the player's status, the position. And what I can not do is put the players to see the monsters, npcs, etc ... Only 1 player can see, the other not!
He also needed help with the movement and spawn of the enemy.
Type: The spawn is creating the enemy without spacing, sometimes it is born on top of another. and on the movement, the enemy is looking like a madman. not every time is good way to follow the player.
Moviment [STEP]:
Spawn [STEP]:
If you can help me I will give the credits and thank you very much!
Note: (I will put the taxpayer credits in the game).
I need a system for multiplayer: I found several, but it's been a while since I moved GM: s 1.4, I ended up forgetting many things. And I'd like some help or even a tutorial I can put into the game.
Type: I put a screen for character selection where there is the 'global.class' variable that consists of the 'Wizard, Archer and Guard'. I would like the client to send this variable to the server, send all the player's status, the position. And what I can not do is put the players to see the monsters, npcs, etc ... Only 1 player can see, the other not!
He also needed help with the movement and spawn of the enemy.
Type: The spawn is creating the enemy without spacing, sometimes it is born on top of another. and on the movement, the enemy is looking like a madman. not every time is good way to follow the player.
Moviment [STEP]:
Code:
switch (state) {
case ste.idle:
image_speed = 0.1;
if (path_exists(pathEnemy)){
path_delete(pathEnemy);
mp_grid_destroy(gridEnemy);
}
if (patrul = 1){
hspd = choose(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
vspd = choose(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
if (hspd = 1){
hspeed = espd*choose(-1, +1);
if hspeed < 0 {
sprite_index = sSlimeLeftRight;
image_xscale = -1;
}else {
sprite_index = sSlimeLeftRight;
image_xscale = 1;
}
if (vspd = 1){
vspeed = espd*choose(-1, +1);
if vspeed < 0 {
sprite_index = sSlimeUp;
}else {
sprite_index = sSlimeDown;
}
}
}
}else{
hspeed = 0;
vspeed = 0;
}
break;
case ste.walk:
if (instance_exists(oPlayer)) {
gridEnemy = mp_grid_create(0, 0, room_width/32, room_height/32, 32, 32);
pathEnemy = path_add();
mp_grid_add_instances(pathEnemy, oBlock, true);
mp_grid_add_instances(pathEnemy, oTree, true);
mp_grid_path(gridEnemy, pathEnemy, x, y, oPlayer.x, oPlayer.y, false);
path_start(pathEnemy, espd, "", true);
if (oPlayer.x > x) {
sprite_index = sSlimeLeftRight;
image_speed = 0.2;
image_xscale = 1;
} else if oPlayer.x < x {
sprite_index = sSlimeLeftRight;
image_speed = 0.2;
image_xscale = -1;
}
if (oPlayer.y > y) {
sprite_index = sSlimeDown;
} else if oPlayer.y < y {
sprite_index = sSlimeUp;
}
}
break;
case ste.attack:
hspeed = 0;
vspeed = 0;
break;
}
if distance_to_object(oPlayer) <= turn_distance && !(collision_line(x,y,oPlayer.x,oPlayer.y,oBlock,0,0)){
patrul = 0;
if distance_to_object(oPlayer) <= 15 && !(collision_line(x,y,oPlayer.x,oPlayer.y,oBlock,0,0)){
//Atk code
if distance_to_object(oPlayer) <= 4{
state = ste.attack;
if (path_exists(pathEnemy)){
path_delete(pathEnemy);
mp_grid_destroy(gridEnemy);
}
}
}else{
state = ste.walk;
}
} else {
state = ste.idle;
patrul = 1;
}
Code:
if counter <= 0 {
for (eSI = 0; eSI < slimeCreate; eSI ++) {
counter++;
var xx,yy;
xx = x+random_range(-60, 60);
yy = y+random_range(-60, 60);
while(place_meeting(x+sprite_width,y+sprite_height,slimeID)) {
xx = x+random_range(-60, 60)+sprite_width;
yy = y+random_range(-60, 60)+sprite_width;
}
//instance_create(x+random_range(-50, 50),y+random_range(-50, 50),slimeID);
m = instance_create(xx+random_range(-60, 60)+sprite_width,yy+random_range(-60, 60)+sprite_height,slimeID);
m.spawn = oSlimeSpawn;
}
}
alarm[0] = timeSpawn; //30=1seg - 60=2seg - 210=7seg
If you can help me I will give the credits and thank you very much!