Zainstaluj Steam
zaloguj się
|
język
简体中文 (chiński uproszczony)
繁體中文 (chiński tradycyjny)
日本語 (japoński)
한국어 (koreański)
ไทย (tajski)
български (bułgarski)
Čeština (czeski)
Dansk (duński)
Deutsch (niemiecki)
English (angielski)
Español – España (hiszpański)
Español – Latinoamérica (hiszpański latynoamerykański)
Ελληνικά (grecki)
Français (francuski)
Italiano (włoski)
Bahasa Indonesia (indonezyjski)
Magyar (węgierski)
Nederlands (niderlandzki)
Norsk (norweski)
Português (portugalski – Portugalia)
Português – Brasil (portugalski brazylijski)
Română (rumuński)
Русский (rosyjski)
Suomi (fiński)
Svenska (szwedzki)
Türkçe (turecki)
Tiếng Việt (wietnamski)
Українська (ukraiński)
Zgłoś problem z tłumaczeniem
Would like to add if you want to make a top-down rpg/shooter where the mouse aims and shoots this is what I modified from OP. I'm a noob so most of this is Drag'N'Drop not scripts.
Create Object: ObjWeaponParent (this is to make cursor aiming)
Create Event: Move Towards Point
x: mouse_x
y: mouse_y
speed: 20 (or whatever you prefer)
*Like OP mentioned - no sprite for Parents.
Next find your weapons: fireball, brick and star.
Make sure you assign the ObjWeaponParent to each of them.
Finally, open objPlayerParent
We got aim above, now to fire with mouse. Now create event - I pick Global Left Mouse - this for whatever reason allows me to hold and fire instead of clicking for each bullet.
1) Event > Global Left Mouse
2) Execute Code : Same Code as OP gave for using space bar to fire.
3) Delete The last two lines of Code:
new_shot.speed = 20;
new_shot.direction = direction;