Use trigonometry. Sounds scarier than it is.
This is the only advice I can give for a not very specific problem. Please post your code or sequence of command blocks for us to look at, or describe in great detail the concept you are attempting to emulate. Otherwise the YYGC is as blind as a bat.
- Game Maker Community
- → Viewing Profile: Posts: mn_beta
mn_beta
Member Since 09 Apr 2012Offline Last Active Nov 30 2012 03:52 AM
About Me
I program occasionally. Then I play with my hair. =(
Community Stats
- Group GMC Member
- Active Posts 81
- Profile Views 806
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Female
-
Interests
Anything.
-
Version
GM7
2
none
Friends
mn_beta hasn't added any friends yet.
Latest Visitors
Posts I've Made
In Topic: Distance to Object But Direction Sensitive
30 November 2012 - 03:39 AM
In Topic: Lowering a variable at a random rate
30 November 2012 - 03:25 AM
BAD idea.
Here is a much more ergonomic solution:
Here is a much more ergonomic solution:
<insertvariablehere>-=irandom(<insertrangehere>)+<insertbasevaluehere>
In Topic: Rate The Avatar Of The Person Above
30 November 2012 - 02:39 AM
An Abra: 7/-5
In Topic: Attack problem please click in....
10 August 2012 - 04:34 AM
From what I can understand you will want this:
There are many ways to make a player or enemy "die"
The cleanest in my opinion is to make character invisible and disable normal character input, or to deactivate the instance.
if x+-[whatever margin you need for hitbox] < [>] enemy.x && y+-[whatever margin you need for hitbox] < [>] enemy.y
hp-=5
//for the next piece of code you will need a direction variable: d
if keyboard_check_pressed(ord("X"))
{
if d=0
{
if enemy.x=x-4
enemy.hp-=5
}
else
{
if enemy.x=x+4
enemy.hp-=5
}
}
// and death check of course.
if hp<=0
//insert deathcode here
if enemy.hp<=0
//insert deathcode here
There are many ways to make a player or enemy "die"
The cleanest in my opinion is to make character invisible and disable normal character input, or to deactivate the instance.
In Topic: Scaling and rotation
10 August 2012 - 03:58 AM
You should very well keep in mind that gml runs slow, and Android is a "compile-as-you-run" so to speak (Just like java). Combine the two for a headache.
- Game Maker Community
- → Viewing Profile: Posts: mn_beta
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content