Page 2 of 2
Re: How to teleport demo

Posted:
Thu Feb 24, 2011 6:18 am
by lcl
Kren, your method is still very much too complicated and slow to use.
I've already explained that for you, here:
viewtopic.php?f=1&t=10049#p69028And bilvyy, I've sent a demo of creating doors easily:
viewtopic.php?f=4&t=9806 Download it.

After you've added
1 variable and 1 code you don't have to code any things anymore.
And the doors work just like you want. They are pairs.

Re: How to teleport demo

Posted:
Thu Feb 24, 2011 11:54 am
by again
again wrote:Ok no using this code you cannot go back through the same door without using a more complex method. But I will teach you how to make doors so you know exactly whats going on with the code.
Ok now I want you to open the GED as I will go step by step and explain the code
Now click on the player/ click on edit/ click on collision on door 4 .
- Code: Select all
You see DestroyActor("Event Actor")
leftappear=1;
Now the destroy actor part destroy"s the actor you control. Now the leftappear=1 means you activated the variable leftappear 1 time.
Now go to the door 2 / click on edit / click on draw actor and you will see this code.
- Code: Select all
if(leftappear==1)
{
CreateActor("player","mage"[,(none),(none),0,0)
leftappear=0;
}
if(leftappear==1) = that means if the variable leftappear=1 , then that triggers the code contain inbetween {} brackets
CreateActor means the player will be recreated at this spot.
Leftappear=0; = this means the variable leftappear will now be reset to 0. If you forget to reset the variable then the door will keep creating your player over and over again.
Ok I hope this helps you understand what is going on with the code. So now you can make any door you want.
1st declare the variable then use this guide I made to make doors. If you need further help just let me know.
Lcl Iam not forcing anyone to use my method. Iam not going into your post saying hey use me instead. The way your sounding is like Iam forcing people to use my method Hahahaaha. Everyone codes different styles and some codes are easier than others. Your doors code is great but some new people wont understand sprint%i type of coding while my style is newbie friendly. Relax Lcl LOL!!
Re: How to teleport demo

Posted:
Thu Feb 24, 2011 2:26 pm
by lcl
I'm not going to start a fight with you.

It seems that you are the only one here who should relax.
I didn't say that you're forcing anyone to do anything.
I just wanted to show my method that saves a lot of time and effort.

Re: How to teleport demo

Posted:
Thu Feb 24, 2011 3:24 pm
by again
lcl wrote:I'm not going to start a fight with you.

It seems that you are the only one here who should relax.
I didn't say that you're forcing anyone to do anything.
I just wanted to show my method that saves a lot of time and effort.

I understand that Lcl , there no fight Iam just explaining myself. If someone is new they couldnt understand you code. Later with more exp they would. You helped me out dozens of times , your really good at coding. But not everyone is at your level either , so your method might be good , but a new person would have a hard time understanding what it means.
Re: How to teleport demo

Posted:
Thu Feb 24, 2011 3:36 pm
by schnellboot
yeahh it's like use this code but don't think about how this works you know?
Re: How to teleport demo

Posted:
Thu Feb 24, 2011 3:54 pm
by lcl
Yeah, I know what you guys mean.

Re: How to teleport demo

Posted:
Fri Feb 25, 2011 1:42 am
by bilvyy
there's no need to argue about whose code is better. i appreciate both of you trying to help me.
@again: thank you for that explanation! i find it easier to use code when i know what's going on with each section of it, and that's easy when someone explains it to me step by step. your code is simple and really easy for me to use and understand, i'm just worried it won't be enough for all the doors in my game.
i have 7 pairs of doors in my entire game. i can't remember if i've asked this, but is there a way to have all 7 pairs in my game using this code? i tried to apply that same one to a different pair, but my player instead appeared at the wrong door because the code was identical.
@lcl: going by your claims, your code sounds like it will do the trick, but i just don't understand it. having the demo is handy but i need a much simpler tutorial, going step by step to tell me how to apply the code to my game. i have some quick questions for you too:
with your code would i be able to go back through a door? and do you think it'd be possible to give me a quick run through of the different sections of the script? i don't really understand the comments and there is just so much; i'm not sure what parts i need to adjust to suit my game and i don't know how to apply it to several doors.
possibly to avoid clogging up again's thread, you could just link me to a post explaining it on your thread instead? if it's not too much trouble at all. i just really need to get these doors working.
Re: How to teleport demo

Posted:
Fri Feb 25, 2011 1:51 am
by again
Ok when you use a variable it can only be used once. So for 7 doors you have to make 7 variables. As far as going back through the door you came from would be difficult. Does this answer your questions?
Do you remeber how to declare variables? If not I can post directions to help you.
Re: How to teleport demo

Posted:
Fri Feb 25, 2011 5:39 pm
by lcl
Ok bilvyy with my code you are able to go back.

I will post you complete explanation of how the code works.
Just wait because I can't do it just right now.

Re: How to teleport demo

Posted:
Sat Feb 26, 2011 1:57 pm
by bilvyy
okay, thank you both.
@again: variables are the "leftappear" aren't they? does it matter what i call them? i remember how, i'm just not sure if there are any specifics to make them.
@lcl: thank you so much. if the code doesn't work for me i'm sure i can just create an extra hidden door to use in order to go back
Re: How to teleport demo

Posted:
Sat Feb 26, 2011 2:25 pm
by again
No it doesnt matter what you call them. You can use any name except functions name and game editor will tell you if its not ok. So no just use names you remember.
Re: How to teleport demo

Posted:
Mon Mar 07, 2011 3:37 am
by bilvyy
okay there's another problem i've stumbled across :/ i'm trying to make new variables so i can attempt creating some more doors, but it won't let me add a new one. i'm pretty sure i'm adding it correctly... i've named it "zooin" but i keep getting this error. how do i know what names are okay?
Re: How to teleport demo

Posted:
Mon Mar 07, 2011 4:07 am
by again
Ok you have to declare the variables 1st before you try to use them.here is a tutorial
viewtopic.php?f=4&t=8603&start=0
Re: How to teleport demo

Posted:
Tue Mar 08, 2011 5:24 am
by bilvyy
thank you so much <3 i'll give it a go now