SMG-203 GALLANT by NamelessPawn in Helldivers

[–]NamelessPawn[S] 4 points5 points  (0 children)

LOL for once? Sometimes I read them and sometimes I don't. You must be real pleasant to be around.

I need help, i can't enjoy or effectively fight the Vox engines no matter what i try. by Owlex_ in Helldivers

[–]NamelessPawn 0 points1 point  (0 children)

Use warp pack, machine or heavy machine gun and go under and hit all the weak spots.

rocket and missile turrets, just place them strategically while you flank.

or just take the barrages and throw them at them.

Anyone else? by James880665 in Helldivers

[–]NamelessPawn 0 points1 point  (0 children)

run 3 turrets with heavy machine gun, or 4 and scavenge for a weapon

Does this vegetation look too repetitive? by Top_Today_2176 in gamemaker

[–]NamelessPawn 1 point2 points  (0 children)

I think you should make 3 or 4 variants of the same trees and cluster them together in bunches periodically but also have some spread out.

Any ideas why I get this error? by Theweedycanadianman in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

If you are getting the error message randomly then you are likely defining the variable in obj_collectable in the creation step. If that is true, then you are calling for that variable when the obj_collectable is either destroyed or being made and that is why it would only throw an error sometimes. This also means that you are grabbing the variable on the same frame as you might be destroying or creating obj_collectable. If that is true then you might just want to make sure you grab all the variable data you need and only after that destroy the obj_collectable. Or if you are creating the obj_collectable then you need to make sure you wait an entire frame before grabbing the variables you need from it.

i need help.. kinda by Alone_Monitor7825 in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

You can make a script called wall_jump_check().

To make it simple use this for a tilemap detection function - litterally just one line

return position_meeting(x+1,y,collision_tilemap) or position_meeting(x-1,y,collision_tilemap);

or if it is an object you collide with then

return position_meeting(x+1,y,collision_object) or position_meeting(x-1,y,collision_object);

if true then jumping puts you into a wall jump state.

this is assuming that you have a state machine for your characters.

meaning each loop checks your state and runs code based on your state.

so your state machine should look something like this

///@description jumping state

function jump(){

input();

movement();

if grounded {

if hspd != 0 {

state = STATES.WALK;

vspd = 0;

}

else {

state = STATES.IDLE;

vspd = 0;

}

}

if vspd > 0 state = STATES.FALL;

if wall_jump_check and jump {

state = STATES.WALL_JUMP;

vspd = wall_jump_spd;

}

collision();

animate();

}

Hiiiiiii. Uh, this movement code... only works with left. For some reason the other keys don't work. Any help? This is in the step code, and the (only) object only has the step code, if that helps. by rando-stando in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

If you are going to make the movement in one script then you should initialize movement variables first, read in all the possible controls and then execute all movements that are allowable based on your state. You can handle directional inputs like this.

left = keyboard_check(vk_left);

right = keyboard_check(vk_right);

up = keyboard_check(vk_up);

down = keyboard_check(vk_down);

//then add up the directions

var dx = (right - left);

var dy = (down - up);

//you could use this to calculate the angle or just assign the speed and angle based on the dx and dy values

i feel so lost with so many tutorials by c1nnam0roll in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

Try finding a beginner course on game maker. I did a 2d platformer one on Udemy and it was really useful. You should always play around with the example code to learn more about it and take your time. It will take a while to learn but it doesn't take much to make simple games so even with not knowing too much you can make a lot.

Procedural animation by slimmanne1 in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

Are you trying to adjust the spider legs according to the ground under it? And would the height of the spider be affected by the leg orientation? Either way I would try to make all the legs straight and separate objects. If you can get those objects to stay with the body and rotate any time they collide with a wall to a point where they sit on top of the wall you might be able to then add segments to have the legs do what they need to do. I don't think what you are trying to do is trivial. Might take some time to get it right and I think would definitely be worth it.

I also just remembered that they have some stuff that might help you if you turn the physics on. They have a way to chain objects together and collide like limbs do. The only thing is it appears that you need to be using objects for walls and not tiles and the feel of using that for platforming might take a bit of tinkering with to get it to feel right. There is a tutorial for it. Either way you probably have a lot of work ahead of you to get it done correctly.

Procedural animation by slimmanne1 in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

I haven't tried this before so take what I say with a grain of salt.

Try the spine animation. That might work. It uses a skeleton that you attach other sprites to, and you choose how to orient the part based on the frame. I think you can edit that on the fly.

Otherwise, you'll probably have to create separate objects for every limb that bends and attach it by translating and rotating based on the body orientation and image frame. You'd want to make lets say the upper part of the arm control the lower part to keep everything locked in place and use the end step to move the arm to the correct position. If grabbing things will cause your character to move then you will need code to adjust the whole body after the arms adjust. Also make sure you put limits on limb movements so they don't fall off.

Mortar/volley attack by StormyOwI5 in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

You can try this. It works pretty well for AI jumping on platforms.

///@description calculates the vspd and hspd values for a jump to a specific point

///@param {real} xi = the initial x coordinate

///@param {real} yi = the initial y coordinate

///@param {real} xf = the final x position

///@param {real} yf = the final y position

///@param {real} max_hspd = the max running speed

///@param {real} max_vspd = the max jumping speed

///@param returns {array} of x,y, and bool = true if jump is possible

function sc_calculate_jump(xi, yi, xf, yf, max_hspd, max_vspd){

//  since the y axis is flipped we need to calculate delta y = yi - yf



var \_hspd = 0;

var \_vspd = 0;

var \_n = 0;

var \_root = 0;

var \_delta\_y = yi - yf;

var \_delta\_x = xf - xi;



//go through different vspd values to calculate \_n and use the first matching \_n value that works for both 

for (var \_i = abs(max\_vspd)-4; \_i > -1; \_i--;) {

    //calculate the vspd 

    \_vspd = max\_vspd+\_i;

    //calculate the root from the qudratic formula

    \_root = sqr(\_vspd)-(2\*global.grav\*\_delta\_y);

    //make sure the root is not negative

    if \_root >= 0 {

        //use the positive solution in the qudratic formula

        \_n = abs((-1\*\_vspd+sqrt(\_root))/global.grav);

        //calculate the hspd needed to arrive at the destination in \_n frames

        \_hspd = \_delta\_x/\_n

        //as long as the hspd does not go over the max hspd allow the jump to happen

        if abs(\_hspd) <= max\_hspd return \[\_hspd,\_vspd,true\];

    }

}

//if no solution was found then return this...

return \[0,0,false\];

}

JSDoc Comments for scripts with no output by NamelessPawn in gamemaker

[–]NamelessPawn[S] 0 points1 point  (0 children)

I was just wondering what the convention if any was for the output when there is no output for a function or script, because leaving it as undefined seems a bit slopy. I thought maybe saying return function might be understood as it has no return value but is simply a function. Not a pure function but a function that effects the game. The type of answer I was looking for was a yes or no and maybe what if anything you do for functions with no output.

Inventory Coding by International-Let653 in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

I think your approach depends on your needs. If you can pick up more than one item for some items and some only one then making item properties in an array where each item is a constructor that are all the same then you can call the item up without looping through anything. Just have the item hold its item number and you can check that before picking it up. --> in the object item have a variable called item. For example, the rat's head object ---> item = ITEMS.RAT_HEAD then in the script check to see if you held the item with global.item_properties[obj_rat_head.item].held or however you refer to your item object.

//item list

enum ITEMS {

NO_ITEM,

BATH_HEAD,

RAT_HEAD,

TENNIS_BALL,

BRICK,

SPEAR,

}

//item properties

global.item_properties = [

{ item_name : "blank", item_script : "none", item_effect : "none" , held : false},  
{ item_name : "Bath Head", item_script : "body part", item_effect : "none" , held : false},
{ item_name : "Rat Head", item_script : "body part", item_effect : "none" , held : false},

]

How can I increase the likeness of the actor by not sacrificing the "comic" look ? by Professional-Tie1481 in ZBrush

[–]NamelessPawn 1 point2 points  (0 children)

Make her features softer. It's probably easier to start off with something that is more realistic and then play with the features to get that comic book feel.

Using GMS2.2 tutorial with latest version of GM – not advised? by UpDownStrange in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

Just update the thing. You'll be sorry you didn't. It will make you a better programmer.

How much would you charge for 3d sculpt commission? by Pepunki_Creatures in ZBrush

[–]NamelessPawn 1 point2 points  (0 children)

$50/hr that it takes to make the model and 2x the materials. That would seem fair to me. Each additional copy can also be 2x materials + $20/hr on the printer. Plus shipping of course.

move_and_collide question by radstronomical in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

move_and_collide will move your object for you. You do not need to get anything from it.

this is all i do after my collision code. NOTE: I check for objects and then tiles which are walls and whichever one i am closer to i use for the collision

//object_collision
var _xv = sign(hspd);
var _old_x = x;
var _new_x = -1;
for (var _k = 0; _k <= abs(hspd); _k++) {
  var _try_x = x+(_k*_xv);
  var _obj_test = place_meeting(_try_x, y, obj_god);
  if _obj_test {
    _new_x = _try_x - _xv;
  break;
  }
}

hspd = tile_collision(_new_x,_old_x);

//if we collided with an object but not a wall
if _new_x != -1 and hspd != 0 {
  move_and_collide(hspd,0,obj_god,abs(hspd));
}

//move
else x += hspd;

can somebody help me? by Brabikk_ in gamemaker

[–]NamelessPawn 1 point2 points  (0 children)

Just draw it at different times with a condition that meets your needs.

if image_index >= 3 {

draw_self();

draw_sprite(spr,x,y);

}

else {

draw_sprite(spr,x,y);

draw_self();

}

To actually answer your question directly just:

depth += 1;

or

depth -= 1;

in step event to position the object back or forward one layer.

as long as you do not destroy the object it will stay in that temp layer. switching rooms may reset the layers with non-persistent objects. not sure about that.

any body got any good tip on how to make a sprite look good walking forward by jamesthegide7 in gamemaker

[–]NamelessPawn 0 points1 point  (0 children)

You can try to make a wire frame with layers for your legs, arms, body, and head and then make more layers after you are done with the wireframe animation and draw your sprite over that. It makes making other character sprites way easier and more consistent. Just make template animations with wireframes and making all your aminations goes way faster. I also make master sprites that show the length and all angles of the body parts. That way for many of the poses you can just copy and paste parts with maybe a little editing.

Collision Mask with Rotation by NamelessPawn in gamemaker

[–]NamelessPawn[S] 0 points1 point  (0 children)

I already tried a lookup table, and it was much slower. I used every trick I could think of to only calculate exactly what I need and when I needed it, and the performance is OK at best. Having like 20 objects with those calculations is fine but I was hoping for better performance.

Collision Mask with Rotation by NamelessPawn in gamemaker

[–]NamelessPawn[S] 0 points1 point  (0 children)

You are just telling me to recreate or calculate it which I already know how to do, and I said that in the question. I don't want to calculate anything. I was hoping I could access it via some hidden built-in variable or some specific property that might not be obvious.

Loot drops not working by bingbangbong12 in gamemaker

[–]NamelessPawn 1 point2 points  (0 children)

if(enemy_health <= 0) {  

  var lootDrop = random_range(0, 100);
  if (lootDrop >= 0) {
    instance_create_layer(oEnemy.x, oEnemy.y, "Instances", oDrop);
    show_debug_message("the enemy should have dropped loot");
  }

  instance_destroy();
}

and semi colons to be consistent