Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - KillerLink

Pages: [1]
1
Coding / Re: Link Platforms & Bouncing
« on: September 17, 2011, 11:52:59 am »
Im still confused about how this works.
I tried this:
Code: [Select]
if place_meeting(x+4*dir,y,obj_mp_return) {dir = dir * -1;} else {x += 4*dir;}
with (obj_Link) do {x += 4* dir;}

And it seems not to work (unknown variable: dir)
The error is the one i would also suspect to get from your code.
But i'm not able to find out why your programm is fine with your code^^

Please correct if i understood something false:
1) Variables (if not global) are stored for every instance of an object.
2) if i do the following, it should not work:
Code: [Select]
//i am obj1
thisvar = 123;
with (obj2) do {x += thisvar;}
because im in the with-do i could only use variables known by the instance of obj2. because thisvar is only known by obj1.

From my View it looks like your code does something like 2)'s example. I searched the whole code of your project.
dire_x gets no where defined for objLink. If my 1) would be correct, you should not be able to use dire_x in with (objLink) do {}

Sorry if im stupid but my brain does not understand this^^

2
Coding / Re: Link Platforms & Bouncing
« on: September 14, 2011, 07:00:44 pm »
Hi!
I took a look at your code! Cool work!
I have a question:
The moving platforms use the following step event code: (i removed the comments for shortening)
Code: [Select]
var dire_x;
if (abs(x - xstart) >= dist_x * 16) direction += 180 / turn_c;
dire_x = ((!direction) - (direction == 180)) * move_s;
x += dire_x;
if (place_meeting(x,y,objLink)){
  with (objLink){
    if (state){
      x += dire_x;                                                                           <<<<<<<<<<<<<THIS LINE
      solid_check_x(dire_x,0,height_f,parSolid);
      bounce_check_x(dire_x,maxi_x * 2,objBounce);
    }
  }
}

The place i marked your using the variable dire_x. Your in an With (objLink) do so your using variables from the objLink object. but this variable gehts NEVER anywhere set for objLink, it does not even show up in debug window -> local variables -> objLink.
It makes me cracy. How does this work?

mfg

3
Coding / Re: Request: Zelda Room Changing
« on: July 11, 2011, 08:41:28 am »
To Atomicd1:
To adress all rooms with on variable by counting left/right as +/- 1 and up/down as +/- map-width is pretty cool idea ; )
I wouldnt ever think so far ^^

I think im inspired by your advices now and will try to make it work ; )
Thanks alot!

4
Coding / Re: Request: Zelda Room Changing
« on: July 10, 2011, 10:40:32 am »
Hm, a good idea.
I think i will do this.
Thanks a lot, jimn346!
But i am still happy to recive other's opinions and advices ; )

5
Coding / Request: Zelda Room Changing
« on: July 09, 2011, 11:42:22 pm »
Hi at First!
Im New to the Forum, it`s awsome ; )
I'm from Austria, so my main language is German, but i hope
my english is good enough to be readable XD

I'm an advanced GML Coder and have my own Zelda-Fangame in progress.
So if anyone does explain me only the idea for a solution for my problem,
i should be able to code that myself ; )

But at the moment im Stuck at one point: room changing and houses.
I do have solutions but i do not really like them...
So far, i solved it how to move to the next (correct) room if you leave the room to the left/right/top/bottom.
I do this by creating a array with lets say with a range of 3x3. in every field i do store the name of the room
which would be located there like on a physical map. so if my "map-coordinates" are 2,2 and i do leave the room
to the right the script increases the x coordinate to 3,2. then i can read out the room-destination out of my
predefined array. I also got it to work that Links-position is also taken correctly to the next room.
For going into/out of houses i was using "teleport-objects" which are invisble and placed in the doors.
if you collide with them, your are teleported to the room, where you should be. What i dont like is:
i do need to make for every house new teleport objects. this is so annoying.

I hope i could explain what im doing^^

So my questions are:
1) For general map changing on the field, what are your systems?
2) The point im totaly stuck: if i want to make houses, do i really need to make an collision/telport object for every house?
  Isn't there any, lets say, "more economic" way to do this?

with best regards
KillerLink

Pages: [1]

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.015 seconds with 31 queries.

anything