- Game Maker Community
- → Viewing Profile: Posts: Pro Pro.
Pro Pro.
Member Since 27 Jul 2006Offline Last Active Apr 02 2013 08:21 PM
Community Stats
- Group GMC Member
- Active Posts 728
- Profile Views 5409
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
16
Doing something right!
Posts I've Made
In Topic: cant trigger collisions on any kind (physicsworld)
12 February 2013 - 03:11 PM
well actually the function used is "move_contact_all", i don't have any solid objects. Also as stated i had code in the collision even AND a step event and neither was activating. I found out the problem was in the enemy object i was setting the objects x position instead of its phy_position_x, which caused it to actually warp around the room at a speed unnoticeable to the view (it was still being drawn at the x position specified, but apparently wasn't there at the time i wanted to check the collision). THanx for replying.
In Topic: Drawing Problem
12 February 2013 - 07:50 AM
well i said to pu it in the simplist way... actually there are like SEVERAL DOZENS of these sprites all over the screen.
im really not sure it is possible at all.... look at the solo vid in my sig and u see what i have now... its the white fading to yello, orange, red sprite that appear ahead of bullets and before explosions. I dont want them to become more opaque as they overlap.
im really not sure it is possible at all.... look at the solo vid in my sig and u see what i have now... its the white fading to yello, orange, red sprite that appear ahead of bullets and before explosions. I dont want them to become more opaque as they overlap.
In Topic: cant trigger collisions on any kind (physicsworld)
11 February 2013 - 11:45 PM
ok, while both objects are physics ones, this is the code for the bullets event that handles movement and collisions:
the spd and dir are set by the player object when the bullet is fired
the enemy object is placed where it needs to be every step using x and y coords.
ALSO this is in teh collision event with enemyparent for the buullet object:
when i had both objects as non-physics, the code was basuically the same except phy_speed x or y was replaced by x+ or y+
bullet is large enough not to do bullet thru paper problem, and the enemy is much much larger than that, literally a dozen bullets will be in contact with the enemy in one step as they pass over it
dir = predir
spd = prespd*global.gamespeed
phy_speed_x= lengthdir_x(spd,dir)
phy_speed_y= lengthdir_y(spd,dir)
with enemyparent if instance_place(x,y,other){
show_message("o2")
_damage = 3.5 * stat_defencemultiplier
hp -= _damage
global.score += round((_damage/7) * global.boostfactor * (global.boostfactor*.01))
global.totaldamage += _damage
dirr = other.direction
with other move_contact_all(dir,spd)
repeat(2){
s1 = instance_create(other.x,other.y,bullet_spark)
s1.image_angle = dirr - 60 + random(120)
s1.image_xscale = .4
s1.image_yscale = .3
}
with other instance_destroy()
}
the spd and dir are set by the player object when the bullet is fired
the enemy object is placed where it needs to be every step using x and y coords.
ALSO this is in teh collision event with enemyparent for the buullet object:
show_message("o")
_damage = 3.5 * stat_defencemultiplier
hp -= _damage
global.score += round((_damage/7) * global.boostfactor * (global.boostfactor*.01))
global.totaldamage += _damage
dirr = dir
move_contact_all(dir,spd)
repeat(2){
s1 = instance_create(x,y,bullet_spark)
s1.image_angle = dirr - 60 + random(120)
s1.image_xscale = .4
s1.image_yscale = .3
when i had both objects as non-physics, the code was basuically the same except phy_speed x or y was replaced by x+ or y+
bullet is large enough not to do bullet thru paper problem, and the enemy is much much larger than that, literally a dozen bullets will be in contact with the enemy in one step as they pass over it
In Topic: cant trigger collisions on any kind (physicsworld)
11 February 2013 - 06:34 PM
Do they have collision events? Do they have fixtures assigned? How are you checking? Are they in the same collision group (0)? If its a physics world, then they should be physics objects... please provide more inorfmation!
i provided most of that info already no they dont have fixtures, i have tried them as physics and non physics objects, have tried using collision event, and using instance place in a step event. When tested as physics objects, there collision group was 0.
as of now i dont want them to be physics objects becuase creating and destroying physics objects seems to lag really bad even if they are just sensors, adn these are bullets being created once a step.
In Topic: physics
11 February 2013 - 07:58 AM
use phy_rotation
- Game Maker Community
- → Viewing Profile: Posts: Pro Pro.
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content