[AS3] How to make Realm Portals appear in Nexus!
In the as3 source, the realm portals is not appearing where they should be. This is because the server is actually not being informed to spawn the portal at the "Realm" region. This fix is extremely simple to fix, and i'll explain it in a moment, without further to do, lets start.
All you want to do is go into: Realmmanager.cs, and add this:
Below this:Code:Task.Factory.StartNew(() => AddWorld(new GameWorld(1, "Realm", true)));
Just add it below you'r list of added worlds.Code:AddWorld(World.GAUNTLET, new GauntletMap());
So lets cut this piece of code out in bits and understand how it works.
It is pretty simple to read even without alot of knowledge to c#. It starts of by telling the server that it is a task that is gonna be executed when the server configures all the worlds added. the "(() => AddWorld" simply means that the task it is doing is adding a world. The realmmanager already have the AddWorld function so we did not have to implement that, wich makes it alot easier. After we have defined what kind of task we are executing, we tell it what world we want to add wich is "GameWorld", if you don't know what GameWorld is: It is just the Realm. There is a file called GameWorld.cs, you can look in that if you want to know more. then we see this "(1, " wich is the ammount of realm portals.
Note: If you set it to 2 for an example there will be 2 realm portals at the same time.
And at last we have the "Realm" wich is just the name of the portal. We normally recognize this string ingame as "Medusa", "Beholder" or "Cyclops". Its just the portal name appearing in the buttom of the sprite.
I hope this was helpfull, leave a thank if it helped you.
Credits to:
@Slendergo, for explaining this to me.
@thenired hey bro ty for all the tuts and all keep it up!!!
lkdjnfoskjednfblksjdfn (05-06-2016)
nice profile pic I guess
oh you dont need to change it lololol its... just... really hypnotizing.....and confusing....
it tells you secrets of the Illuminati and the meaning of life and its too much for my simple mind....good bye I am going to cry in a corner now
but besides the amazing signature good work on the tutorial it helped people and the P'server Nation is ... < that much closer to becoming better
"One should not seek to know and understand the meaning of life"...for the meaning of life will be presented...
when we all perish"Life greatest questions can only be answered in a man that believes not in god...but in himself and his abilities so understand the Universe"
"The most important moment of your life is and will always be the way you lived it to the moment you died"
"My methods may be harsh in contrast to my true intentions"... you may fight, cry, beg, and deny but at the end you will truly see why I done such a thing
lkdjnfoskjednfblksjdfn (05-12-2016)
"One should not seek to know and understand the meaning of life"...for the meaning of life will be presented...
when we all perish"Life greatest questions can only be answered in a man that believes not in god...but in himself and his abilities so understand the Universe"
"The most important moment of your life is and will always be the way you lived it to the moment you died"
"My methods may be harsh in contrast to my true intentions"... you may fight, cry, beg, and deny but at the end you will truly see why I done such a thing
"One should not seek to know and understand the meaning of life"...for the meaning of life will be presented...
when we all perish"Life greatest questions can only be answered in a man that believes not in god...but in himself and his abilities so understand the Universe"
"The most important moment of your life is and will always be the way you lived it to the moment you died"
"My methods may be harsh in contrast to my true intentions"... you may fight, cry, beg, and deny but at the end you will truly see why I done such a thing