Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
if instance_create(x,y,obj_kugel)
{
}
i set it in /obj_"char"/event/global left pressed
firerate = the fire speed (the higher the number the faster it shoots)
accuracy = how accurate it will shoot
now this happen :/
step: if counter > 0 { counter -=1}
mouse_left_pressed: if(counter == 0) { instance_create(x,y,obj_bullet); counter = 60; }
that works, but thanks anyway :)
draw_sprite_ext(spt_bullet,image_index,x,y,1,1,direction,c_white,1)
"let the bullet fly straight to characters pov"
i think this will made the problem but its fixed now.
u can close this thread now or leave it for a smart lesson.
if another one get stuck here maybe on of this ways could help him
if(keyboard_check(ord("S"))) { speed = -walkingSpeed; }
used simply the same movement code
var sp;
sp = 3;
if keyboard_check(ord("W")){if place_free(x,y-sp){y-=sp}}
if keyboard_check(ord("S")){if place_free(x,y+sp){y+=sp}}
if keyboard_check(ord("A")){if place_free(x-sp,y){x-=sp}}
if keyboard_check(ord("D")){if place_free(x+sp,y){x+=sp}}
the little bit smarter way, i also dont have to set the place_free var solo also got the speed into it. what do u think about it ? i think its a smart way to keep ur code small, it is?
:D
Not sure what OP is programming in, but all C-dialects have a time method (time.deltaTime in C#) to calculate time passed between cycles.
Set the alarm to trigger when a button is pressed, then to time itself out for a certain amount of time then trigger itself again to create a cycle. My main PC is down for the moment or I would give you snippets of code to refer to.