Hallo liebe gm-d community!
Hier ist ein Script, womit sich die View wie in den alten Zelda Games verhält.
Vielleicht kann es ja jemanden helfen
Spoiler anzeigen
Alles anzeigen
MFG Funce
Hier ist ein Script, womit sich die View wie in den alten Zelda Games verhält.
Vielleicht kann es ja jemanden helfen

GML-Quellcode
- /*
- argument0 = Objekt-Name
- argument1 = Übergangs-Geschwindigkeit
- argument2 = View [0..7];
- */
- obj=argument0;
- transpeed=argument1;
- view=argument2;
- if (!variable_local_exists("xcheck")) {
- xcheck=0;
- }
- if (!variable_local_exists("xtrans")) {
- xtrans=0;
- }
- if (!variable_local_exists("xv")) {
- xv=0;
- }
- if (!variable_local_exists("ycheck")) {
- ycheck=0;
- }
- if (!variable_local_exists("ytrans")) {
- ytrans=0;
- }
- if (!variable_local_exists("yv")) {
- yv=0;
- }
- // X Right \\
- if (xcheck==0) {
- if ((view_xview[view]+view_wview[view])<obj.x) {
- xv=view_xview[view]+(view_wview[view]*2);
- xtrans=1;
- xcheck=1;
- }
- }
- if xtrans=1 {
- if ((view_xview[view]+view_wview[view])<xv) {
- view_xview[view]+=view_wview[view]/transpeed;
- }
- if ((view_xview[view]+view_wview[view])==xv) {
- xv=0;
- xtrans=0;
- xcheck=0;
- }
- }
- // X Left \\
- if xcheck=0 {
- if (view_xview[view]>obj.x) {
- xv=view_xview[view]-view_wview[view];
- xtrans=1;
- xcheck=1;
- }
- }
- if xtrans=1 {
- if (view_xview[view]>xv) {
- view_xview[view]-=view_wview[view]/transpeed;
- }
- if view_xview[view]=xv {
- xv=0;
- xtrans=0;
- xcheck=0;
- }
- }
- // Y Down \\
- if ycheck=0 {
- if ((view_yview[view]+view_hview[view])<obj.y) {
- yv=view_yview[view]+(view_hview[view]*2);
- ytrans=1;
- ycheck=1;
- }
- }
- if ytrans=1 {
- if ((view_yview[view]+view_hview[view])<yv) {
- view_yview[view]+=view_hview[view]/transpeed;
- }
- if ((view_yview[view]+view_hview[view])==yv) {
- yv=0;
- ytrans=0;
- ycheck=0;
- }
- }
- // Y Up \\
- if ycheck=0 {
- if (view_yview[view]>obj.y) {
- yv=view_yview[view]-view_hview[view];
- ytrans=1;
- ycheck=1;
- }
- }
- if ytrans=1 {
- if (view_yview[view]>yv) {
- view_yview[view]-=view_hview[view]/transpeed;
- }
- if (view_yview[view]==yv) {
- yv=0;
- ytrans=0;
- ycheck=0;
- }
- }
MFG Funce
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von Funcestor () aus folgendem Grund: Update Again!