Thứ Bảy, 3 tháng 3, 2018

Waching daily Mar 3 2018

Your fears don't define you.

You know, who you are as Supergirl...

who you are as Kara,

that's what defines you.

Kara Danvers... is my favorite person.

She's saved me more times than Supergirl ever could.

Supergirl is what I can do.

Kara is who I am.

For more infomation >> Supergirl - Kara Zor-El- This is Me - Duration: 3:02.

-------------------------------------------

Dog is Afraid of Walks, Rehabilitation | K9 Connection Dog Training, Buffalo NY - Duration: 13:00.

We want to do things with her that are going to kind of bring her positive

emotions up during that, right, so do you ever do anything, like do you ever teach

her cute tricks or anything like high five? "Nothing crazy, she just sits." Okay so like what we might do, and

we start a little bit today, is teach her a couple of little fun things. And the

reason I like to do this, is in my experience, activities that the dog

associates with rewards as a whole become more rewarding than just a reward in and of

itself, okay. So as an example, like you saw two sessions ago or three sessions ago when we tried the jumping, right and you actually saw

how as she was jumping her energy came up; we're gonna do some more of that

today. Remember tail came out and she started

to feel really good about herself when she did that. Every time she did it

she was getting a reward. The think about training a trick is it's all fun and

games, like we don't put any pressure on the dog, it's like we're just having fun

here if you don't want to do it, fine, we can do it some other time,

and we're almost always rewarding the dog with the treats so there's a really

strong correlation. So what starts to happen is the behavior itself creates

the emotions. And because the dogs putting energy into the behavior it just

tends to be a more potent form of creating those emotions. So now I'm going

through my drill, I get her ready and Ieash her up, I've got my coat on, I go out, I'm in the

hallway, maybe I've taught her to do a spin on command.

Maybe just with a little food lure, spin her around. And so we go in the

hallway, we do three spins, and she's like "Yay!" and then we go back inside. And you might find that

going out there and doing that fun little trick that she's already - we've

already pumped that up separately. So they'll teach the tricks separately from

the drill and then add it to the drill. You might find that that actually

gets her in a better place emotionally than if we were to just bring her in the

hallway and hand her a cookie. Does that make sense? "Yeah, cause she's so focused on the stress of going outside." And we do this in so

many different contexts. And even if like maybe you get to a point where it's like

all right, still really good, I'm leashing her and everything's going great and then

I only see your start to stress like once we get out the front door because

she's anticipating having to go for the walk and maybe there's construction down

the street or whatever so maybe we do that, we do the whole thing, we get on the

front porch, we're on the front walkway and then we do a little high five and a

spin and off we go back inside, okay and so we just do these things to pump her

up. And eventually it's like, okay she hates when a garbage truck goes by so

we're walking along, here comes a garbage truck, it goes by,

hey you survived - spin spin spin - high five - weave between my legs, yay! It

just can help to bring her back emotionally from where she was, and

I find that those types of things, those kinds of games, are way more potent than

again like, garbage truck. Treat. No, garbage truck, do something energetic. Do

something fun. Bring your energy up. "Kind of take her attention away from it, too."

Yeah but it's like our bodies and our minds are connected, right. Like people

who are top performers in various fields know this, you know people that are stage

performers, they pump themselves up before they go onstage. They jump up and

down, they shake their hands, they get their blood flowing in their body

because the moving, the activity feeds our emotions and our state of mind.

And so it can be a very powerful thing. So we can definitely, like I

always start with spin because it's like, it's just stupidly easy and the dogs

when they learn it, they tend to like it, it gets their energy moving and

it's like, it's motion based, like I'm looking for getting their body moving as

opposed to like a high five, which is like they just sit there and do this. I want them to move.

That's why the jumping, like going over a jump is so potent because they have to

express their energy in order to do it. So it brings everything up, you know what

I mean? But you can't almost go out in your walk carrying a jump, so

we need something that's doable out on the walk.

So teaching the spin is super easy, it's really just a matter of luring the

dog in a circle, right, so luring is just basically using the dog's nose. Hold food

in your hand. I just want them to bend their head and

then start to turn their body. Now. Some dogs just do funky stuff in the

beginning, right, like you're trying to rotate them around and they start

walking backwards or jumping up on your hand or doing something else so

sometimes what we have to do is just reward pieces of it, okay. Right so instead of

expecting the dog to turn all the way, sometimes I might just get her to bend

her head like this and just reward that a bunch of times and then eventually she

should go, you know that's kind of uncomfortable, and she'll move the rest of

her body around. So some dogs you can just move right around in a circle, no

problems at all. Sometimes we've got to break it up into parts.

So practice that a bunch of times on that side, and you want to get to a point where it becomes

really fluid. This should be a very easy thing to teach. And what will happen

eventually is like, you'll just kind of do a gesture with your hand and she'll just whip around.

So with this kind of thing too you can use what we call a verbal marker.

So we often use reward markers, it's just a sound that indicates to

the dog precisely what they're being rewarded for. If you've ever heard of people

training with clickers, it's the same idea.

The clicker's just a really precise sound that the dog knows means

that a reward on its way. So what happens is, whatever the dog is doing when they

hear that sound, they know is what they're being rewarded for. And it allows you to

pinpoint things. So in this context she's spinning around in a circle, she gets back

facing me and then I reward her, well was she rewarded for the fact that she spun

around or the fact that she's now facing me? Am I rewarding the action or the position?

It can be confusing for the dog, so what I'll do is I like the

dog to associate the word yes with the reward coming, and then I'll say yes

while they're rotating, right so I'll give them like right past that 50

percent mark and while their body's in motion, "yes."

And then I reward that final position so they know it's the action of spinning that

is what's being rewarded, it is not just being in front of me facing me however

they get there, it's the actual act.

"Yes! Yes!"

"Yes, good girl yes." I try to say yes one time per reward so get her doing what

you want and when she's doing it the way you like it, "yes," and then she comes all

the way around and reward her.

"Yes!" Perfect, that was great. So otherwise what happens sometimes is because they get

the reward when they're facing you, so like they're already facing you and you're

trying to go over there and they're like "What, I'm right here, this is what you want right? Like you keep

rewarding me when I'm right here, so I am right here." You see what I mean? And for

some dogs it's no problem at all but we do want to just make sure we are being clear

to the dog as far as specifically what we're rewarding.

"Yes! Yes."

"Yes, yes."

"Oh wait I did the wrong side."

"Yes!"

Yeah and what you were doing was you were saying

yes and then feeding and then saying yes again. It would be like, so like you know

if you order something on Amazon you get a little email that says

"Your package is on the way, here's the tracking number." It would be like if

they sent you that and then they sent it again after you already got your package.

Right it's like yeah I don't need the tracking number anymore I already

have it, I already know when it's gonna be here, it was yesterday.

See what I mean, so you telling her yes is basically getting that little

like "Hey we received your order your package is on the way." Right like

that's what it is. "Yes!" Perfect and that was great timing because you

actually marked the moment her butt came up off the ground

and was standing, which is really the way we want her to do it. We don't

want her spinning on her little butt, we want her to stand up and put some

energy into it. "Yes." Beautiful. All right give her a little break and

then we're gonna just go the other way because we need to unwind her, you know.

No, it's just nice to have dogs be able to be flexible. A lot of dogs have a dominant side

just like we do so you may find that one way or the other is actually easier for her.

Like my dog spins this way really easily but has a hard time with this way and that's kind of good to know. So

we don't have to be super particular about this, this is really just something

we're doing for fun and to be able to create some energy. So the

most important thing is I just want you to practice it a lot and get reps in.

When I say practice it a lot I don't want you to do really long

sessions of it, okay, because that makes it boring. Think of anything fun

that you like doing and then imagine being forced do it for 36 hours

straight and you would hate it. So you want little short and sweet

sessions but do it frequently. You could just have like, I like to keep

little jars of treats around my house to make an easy, just randomly throughout the day

like grab a treat, make her spin. So do it frequently like that but you want

to stop practicing, let's just say if you do repetitions like we are right now, you

want to end the session while she's still really into it. You want to

leave her a little bit dissatisfied, you know what I mean, that's what will make her

more excited to do it next time. Yes she'll be like "Oh, I was waiting for this!" Yes so short and sweet but frequent.

Okay now if you want to get to the point where like you don't have to bend

and spin her all the way around and you want to eventually add a word to this

etc. So the first step would be, you want to add a word. Pick what you want to call it, right,

spin, twist, boogie, whatever I don't care just pick a word and

you would give the cue right before you do the lure. Very important that it's before

not at the same time because the cue helps the dog to predict what's going

to happen next. I think I would say like if I was gonna swing a broomstick

at your head would you prefer me to tell you duck before or after? Before, right,

because that gives you the advantage. Likewise, do you have a favorite

candy or like a favorite food, something that you love eating? "French fries." Okay so let's say you were

starving and you haven't had french fries in forever. I've got some and I'm

gonna like, I've got pinpoint accuracy. I'm gonna throw one directly in your mouth.

Okay would you prefer me to tell you I'm going to do that before I throw it or

after I throw it? Probably before so you can open your mouth and have a

better chance of catching the food. Let's say you didn't even speak English,

you didn't know any English at all but I went "Open." And then threw. "Open." And then

threw. Pretty soon when I say "open", you're just gonna open your mouth. Now if I already

have bounced the French fry off your forehead and then I tell you "open," you're

not going to learn that cue. That doesn't give you any advantage, it's like well what good does that do me?

So that's just the way our brains are programmed to learn. So she

wants the food. You give her the sound that helps her predict what to do to

get it and then she'll start doing that. The other thing as you start doing that is

you want to start kind of fading away that physical prompt.

The actual circular motion with your hand. So what I do is, right now you're

spinning her 100% of the way around and then rewarding. So what I would start

doing is I'd spin her almost all the way and then remove my hand and see if she

finishes on her own, okay. And then I go yes and reward and I just start

pulling that hand away earlier and earlier and earlier so eventually I kind of

go like halfway and pull my hand then she spins the rest of the way on her

own and gets the reward. And eventually it's just like, I'm just up here and I go

like I just kind of start the gesture and she goes "Oh I know what that is." And she

spins around and now you don't have to bend all the way down and do the whole big

circle anymore. That stuff is details, okay. Personally I don't care if she does

this perfectly on verbal cue. I don't care whether you have to bend down and

do the whole thing around or not because for our function I'm just using it as a

way to pump her up and make her feel great. It doesn't matter, but if

you wanted to take the training to that level those will be the next steps, okay?

For more infomation >> Dog is Afraid of Walks, Rehabilitation | K9 Connection Dog Training, Buffalo NY - Duration: 13:00.

-------------------------------------------

Fox News Is Feeding Trump's Dangerous Paranoia And Psychosis - Duration: 3:58.

It's been a few weeks since we've seen any real stories emerge questioning Donald Trump's

sanity or his mental stability, but the reason for that is because we don't need anymore

think pieces on whether or not Donald Trump is mentally stable enough to be the president

of the United States.

All we need to do is look at his Twitter feed, and what he has been tweeting within the last

week or two shows that this man is almost, at this point, certifiable.

Earlier this week, Donald Trump, while watching Fox News, decided to go on a live tweeting

spree and quote some of the people on Fox News talking about the fact that these investigations

haven't shown any evidence yet, which, again, five people have pled guilty, so that's really

not exactly no evidence.

Not to mention the fact that they haven't even released the evidence that they have

found.

So, sure, there's no evidence yet that we can see.

That doesn't mean that investigators don't have it, you moron.

But, nonetheless, Donald Trump went off the rails tweeting people on Fox and Friends that

he believes exonerates him and other Fox News programs, Hannity, Tucker Carlson, and the

like.

But on Tuesday morning, a tweet came out from Donald Trump that just, in all caps, said,

"WITCH HUNT!"

At 6:49 a.m. on February 27, 2018, "WITCH HUNT!"

That was it.

There was no other context.

It wasn't attached to another tweet.

Just said, "WITCH HUNT!"

This man has lost his damn mind.

He is literally doing the same thing that Richard Nixon did before he was forced to

resign from office because he was facing impeachment.

He doesn't even realize that the things he says mirror what Nixon said.

The problem of it all is Fox News.

They are feeding the president's psychosis and paranoia because at the same time that

he's tweeting out that he's been exonerated because there's no evidence, Fox News runs

segments saying Hillary Clinton should be investigated and there's tons of evidence

everywhere, so Trump starts tweeting that out.

His paranoia about this woman who hasn't been active in politics for a year.

He is still so obsessed with her because she won the popular vote that he'll stop at nothing

to take her down with him, and Fox News is feeding it.

The crazier Fox News gets, the crazier the president gets.

It is a very real problem for people in the United States.

We already saw this past summer when Donald Trump was watching footage that Fox News was

showing of an attack years and years ago, and he tweeted out that we have to do something

about this because he didn't realize that that footage was a decade old.

That's what happens when you have a simpleton running this country who gets his information

not from his intelligence briefings every day, but from Fox News.

Fox understands it.

They know their role.

They know the president is watching, and so they have tailored their message to suit whatever

that crazy man wants to hear, and that's what's so dangerous about this.

The crazier Fox gets, the crazier Trump gets, and they will continue to defend him and feed

into his psychosis until he's out of office.

For more infomation >> Fox News Is Feeding Trump's Dangerous Paranoia And Psychosis - Duration: 3:58.

-------------------------------------------

Where is Daniel Rickett - Duration: 2:00.

For more infomation >> Where is Daniel Rickett - Duration: 2:00.

-------------------------------------------

WHY INSTALLATION OF LATEST LASER WEAPON SYSTEM (LaWS) IN USS PORTLAND IS A SIGNIFICANT DEVELOPMENT? - Duration: 6:19.

The U.S.'s latest amphibious ship is getting a laser weapon just in time to show off at

the 2018 Rim of the Pacific (RIMPAC) war-games.

The USS Portland, which will function as the flagship for the multinational military exercises,

is set to receive the latest version of the Navy's Laser Weapon System.

. US Naval Institute News reports the Navy is installing the next generation version

of its Laser Weapon System (LaWS) on the ship.

This development paves the way for laser weapons to be integrated across the Navy fleet.

In this video, Defense Updates examines WHY INSTALLATION OF LATEST LASER WEAPON SYSTEM

(LaWS) IN USS PORTLAND IS A SIGNIFICANT DEVELOPMENT?

USS Portland is a San Antonio-class landing platform, dock ship, it is set to enter service

with the U.S. Navy in April.

The Portland displaces 25,000 tons, and has a top speed of 22 knots.

According to the Sixteenth Edition of The Naval Institute Guide to Combat Fleets of

the World, it can carry two LCAC (Landing Craft, Air Cushion), roughly 700 Marines,

and up to 4 helicopters.

It is armed with the Mk 31 launcher for the RIM-116 Rolling Airframe Missile and two 30mm

Bushmaster II chain guns.

The weapon is a next-generation upgrade from the U.S. military's Laser Weapon System (LaWS),

which has been tested in the Middle East aboard the U.S.S.

Ponce, programme manager Captain Brian Metcalfe said.

Like its predecessor LaWS, the new weapon will be a "bolt-on" addition to the ship's

arsenal and as such will not be fully integrated into Portland's other systems and in current

configuration will essentially act as a test bed.

The existing laser weapon is a $40 million system has demonstrated the ability to take

down an incoming drone, undeterred by wind and without making any noise.

As soon as the laser makes contact with a drone, the vehicle heats to a temperature

of more than 1,000°F (537°C) and explodes.

The weapon is also extremely precise, which could minimize deaths in wartime, according

to the Navy.

This is a 30-kilowatt system.

It is predicted to be combat ready by 2020.

The US NAVY is planning larger laser guns of between 100 and 150 kilowatts.

A lot of the ships in the Navy's fleet are capable of having them aboard.

For example, Ford class super carriers have newly designed reactors, 2 Bechtel A1B nuclear

reactors producing 300 MW of electricity, triple the 100 MW of each Nimitz-class.

This extra power is meant for powering Laser weapons for future.

The speed – 50,000 times the speed of an incoming

intercontinental ballistic missile – enables it to strike a target almost instantaneously.

Silent and generally invisible, as it usually operates at an optical wavelength indiscernible

to the human eye, the Laser Weapons System (LaWS) runs off its own electrical generator

and needs no ammunition.

Highly accurate, it is very effective when used against small, speedy targets, including

incoming rockets, small drones and artillery shells.

Low maintenance, high safety, and long lifespan are its characteristics.

The cost is only about a dollar a shot.

The maximum range is limited as laser energy tends to diffuse in the atmosphere, especially

when obstructed by sand, smoke or fog.

Atmospheric absorption, scattering, and turbulence prevent shipboard lasers from being all weather

weapons.

A laser beam has difficulty burning through denser materials.

It needs time to inflict the damage and disable a heavy projectile.

With no kinetic impact, a laser may fail to stop the target.

In theory, laser weapons may be used for offensive missions, but the primary function is defensive.

Countermeasures to laser guidance also include laser detection systems, smoke screen and

anti-laser active protection systems.

Targets can be coated with materials that can absorb laser energy.

Rim of the Pacific (RIMPAC) is the largest multinational exercise in the world.

Hosted by the U.S. Navy, it is held on even-numbered years off the coast of Hawaii.

It is designed to practice interoperability among navies, allow naval forces from different

countries to familiarize themselves with one another, and ends with a big SINKEX, a sinking

exercise where everyone sinks decommissioned ships.

Twenty six countries participated in 2016: Australia, Brunei, Canada, Chile,

Colombia, Denmark, France, Germany, India, Indonesia, Italy, Japan, Malaysia, Mexico,

Netherlands, New Zealand, Norway, the People's Republic of China, Peru, the Republic of Korea,

the Republic of the Philippines, Singapore, Thailand, Tonga, the U.K., and the U.S. Brazil

had to back out at the last minute.

Almost all the participants are either friendly to the United States or key allies with the

sole exception being China.

The presence of a laser on the Portland will be a reminder to those allies present just

who has the most technologically advanced naval force in the world.

It will also make an impression on the Chinese military, which has been working on directed

energy weapons.

For more infomation >> WHY INSTALLATION OF LATEST LASER WEAPON SYSTEM (LaWS) IN USS PORTLAND IS A SIGNIFICANT DEVELOPMENT? - Duration: 6:19.

-------------------------------------------

sad life is strange [gmv] - Duration: 3:56.

For more infomation >> sad life is strange [gmv] - Duration: 3:56.

-------------------------------------------

Filipino Comedian is Less Important Than His Wife's Bags - Duration: 1:43.

if you really want to make your wife happy

you buy her a bag, right?

all the women here it doesn't matter

I feel fat I'm so depressed

bag! changes things

[laughter] it just solves problems, it does

it doesright? I mean, Tom right?

when you buy her a bag, right

I'm sure. right sir? if you bought her, see

yes, he needs to buy me more

buy me more bags

I'm depressed

buy me more

yeah it's in the marriage contract

you shall buy her all the bags that she wants

coz my wife

when she doesn't have a new bag, "Oh I don't want to go out"

"I feel fat"

"I feel ugly" right? then you buy her a new bag

"Oh my gosh. Let's go!"

"Let's go to the mall"

Oh hey hi! hey hey hi

hey long time...

how are you? haven't seen you

nice to see you. okay, bye

honey, who was that?

I don't know

but she was looking at my Birkin

[laughter]

my Birkin. and women will treat their bags

better than they treat their husbands

you ever go to a restaurant? waiter, extra chair for my bag!

forget your husband. extra chair for my bag

waiter: what about your husband he has no seat

wife: never mind him. this is a Birkin

it's more expensive than him

[laughter]

I know coz I write the checks

actually I don't, she does

the bank calls, "Sir there's fraudulent activity on your credit card

that's my wife

don't ever call her that again

please

For more infomation >> Filipino Comedian is Less Important Than His Wife's Bags - Duration: 1:43.

-------------------------------------------

Who is that?: Lobby - Duration: 34:31.

In this tutorial we will create a simple lobby for the platformer multiplayer add-on.

Note that you need to setup a master server and set the IP in Engine_Settings for this to work. (See: Included Files>DigitalOceanOnlineServerSetup.pdf)

First we need a new "join lobby" button.

obj_Multiplayer_Select>Draw

This menu is shown when we click the "Network" button in the main menu.

Lets rename "JOIN" to "JOIN KEY" and move it.

Because this will use the old key system.

mouseButtonPressed=DrawButton("JOIN KEY", 1, _xCenter, _yCenter-32*1,mouseButtonPressed);

Copy this and paste below.

mouseButtonPressed=DrawButton("JOIN LOBBY", 2, _xCenter, _yCenter+32*0,mouseButtonPressed);

mouseButtonPressed=DrawButton("BACK", 3, _xCenter, _yCenter+32*1,mouseButtonPressed);

mouseButtonPressed=DrawButton("HOST", 0, _xCenter, _yCenter-32*2,mouseButtonPressed);

This should now display a new option in the network menu. A Lobby option.

Now I see that I wrote wrong in the video so just let me just fix this.

If you followed the subtitle you should be fine.

Ok. We added an option so now we need to make this button work.

obj_Multiplayer_Select>Step

We now added a button so we want it to wrap every 3rd instead od 2nd

if (buttonSelected > 3) {buttonSelected = 0;} if (buttonSelected < 0) {buttonSelected = 3;}

We changed the back button to nr 3 so we do this here:

case (3):

Lets copy one case as template and paste it below.

And we want our lobby button to go to a lobby room:

case (2): PlaySound(snd_Positive); room_goto(rmMultiplayerLobby); break;

The room dont exists yet but we will create it now.

Do a quick test to see that the buttons are in the right place.

Seems ok.

Ok. Now for the lobby room.

Lets duplicate rmMultiplayerJoin to rmMultiplayerLobby so we get the right room size.

Remove the objects in the room.

We need a menu object for this room so lets create a new group in objects>Multiplayer

Multiplayer>rmMultiplayerLobby

We need a menu to build on so we can duplicate obj_Multiplayer_Select to obj_Multiplayer_Lobby and move it to our group.

We go to rmMultiplayerLobby and add obj_Multiplayer_Lobby to the room

Ok. We need to configure the menu so it display the hosts from the master server.

First we need to download the host list from the master server.

obj_Multiplayer_Lobby>User Defined 0

/// Request server list from online server

var filter_array=noone; filter_array[1]=obj_engine_settings.GameName; gmon_downloadServerList(0,3,server_offset,filter_array);

We will use the game name as filter. This will make sure we only get a list for this game.

We set some fixed values like 3 hosts and offset 0. This will just get the first 3 hosts from the master server.

We also add an offset value so we can scroll the host list.

Ok. We need to call this event and also make sure we have a connection to the master server.

obj_Multiplayer_Lobby>Create event

/// Start master server connection

if instance_number(obj_htme)<1 instance_create(0,0,obj_htme);

// Offset value server_offset=0;

// Request lobby data event_user(0);

Ok. When the object is created we start the connection with the master server and request a server list.

We want to make sure this works so we will enable the master server debug messages:

Scripts>Multiplayer>Update>GMnet>gmon>gmon_config

gmon_debug=true;

Lets do a test run.

You should see something like this in the output: MULTIPLAYER ENGINE [8909|7:28:16] htme_init - INFO - SETTING UP GMnet CORE 8942.41 : Incomming packet from online server (size: 1) 8942.44 : gmon_Networking: Got server list.

Now we need to display the lobby data.

obj_Multiplayer_Lobby>Step event

/// Grab lobby data

// Only get list if not try joining if obj_connection_handler.GameJoin=false { }

// Get server list var server_list = gmon_getServerList();

// Check if lists exists if (is_array(server_list)) { }

// Loop list for (var i=0; i<array_height_2d(server_list); i+=1) { }

// Grab info we need var description = gmon_getDataString(server_list,i,3); var server_key = gmon_getDataString(server_list,i,5);

// Put in button array to use in menu button_desc[i]=description; button_key[i]=server_key;

Ok. This will grab the lobby data and fill an array with the description and the key. The key is used to join a server.

else { }

If no lobby data is found we need to reset the array.

// Reset arrays for (var i=0; i<3; i+=1) { }

button_desc[i]="Server " + string(i+1+server_offset); button_key[i]="";

We also need to reset the array in the create event.

obj_Multiplayer_Lobby>Create event

/// Reset arrays for (var i=0; i<3; i+=1) { }

button_desc[i]="Server " + string(i+1+server_offset); button_key[i]="";

We also want them to reset each time we get the lobby data.

So we copy this.

obj_Multiplayer_Lobby>User Defined 0

// Reset arrays for (var i=0; i<3; i+=1) { button_desc[i]="Server " + string(i+1+server_offset); button_key[i]=""; }

We now want do draw these as the button text.

obj_Multiplayer_Lobby>Draw

mouseButtonPressed=DrawButton(button_desc[0], 0, _xCenter, _yCenter-32*2,mouseButtonPressed);

mouseButtonPressed=DrawButton(button_desc[1], 1, _xCenter, _yCenter-32*1,mouseButtonPressed);

mouseButtonPressed=DrawButton(button_desc[2], 2, _xCenter, _yCenter+32*0,mouseButtonPressed);

mouseButtonPressed=DrawButton("Prev.", 3, _xCenter, _yCenter+32*1,mouseButtonPressed);

We need a next and previous server buttons so we copy one line and paste it two times.

mouseButtonPressed=DrawButton("Prev.", 3, _xCenter, _yCenter+32*1,mouseButtonPressed);

mouseButtonPressed=DrawButton("Next", 4, _xCenter, _yCenter+32*2,mouseButtonPressed);

mouseButtonPressed=DrawButton("BACK", 5, _xCenter, _yCenter+32*3,mouseButtonPressed);

We now need to make these buttons work.

obj_Multiplayer_Lobby>Step 1

if (buttonSelected > 5) {buttonSelected = 0;} if (buttonSelected < 0) {buttonSelected = 5;}

Let's test so we know it shows the servers.

We start a host on P2.

Let's check the lobby.

Here we see the host we just created.

Now we need to make so it connect to the host if we click on it.

obj_Multiplayer_Lobby>Step 1

// Set what index to process var server_index=0;

// Check if we try to join if obj_connection_handler.GameJoin=false { }

// Make sure we got a key if button_key[server_index]!="" { }

// Reset as host obj_connection_handler.GameHost=false;

// Set as try join obj_connection_handler.GameJoin=true;

// Set text as connecting button_desc[server_index]="Connecting...";

// Set the key in the connection handler global.MP_unique_id=button_key[server_index];

// Try connect scr_connect_join();

We do the same for the other two and change the server index.

1

2

We also need to be able to see scroll the list.

case (4): break

PlaySound(snd_Positive); // Remove 3 but be sure the minimum is 0 server_offset=clamp(server_offset-3,0,100);

// Grab new server list event_user(0);

We copy this for the next button too.

case (4):

// Check next 3 servers server_offset+=3;

case (5):

We also need to make sure we disconnect. If we press the back button while we try connect.

// Disconnect scr_disconnect_friend();

// Reset

// Go to menu

The menu should work now.

Lets do a qick test.

P2 host

P1 join

And we are now connected to the host.

We see that we have now joined the host. When joined we want to go to the main menu.

obj_Multiplayer_Lobby>Step

/// Check if connected if obj_connection_handler.Connected { room_goto(roomMenu); }

We also may want to change the server description. As default this is "Friend to friend play". But we can do a search for it and change it.

The one we are looking for is htme_setData. So click this one.

We can change this here or create a global that we can put in here to get the description when a host is created. You can set the global and this script can grab it to display whatever you want in the lobby.

Let's change this to "Platformer#Server" for now.

As default you can only connect to hosts with the "Friend to Friend" description. So we need to allow to connect to any server with any description.

If you go back to the search result you will notice two lines begin with "if server_port=". Click the first one.

Remove: and description="Friend to friend play" from the if statement.

Go back to the search result and click the next one.

Remove: and description="Friend to friend play" from the if statement.

Ok. Lets test it.

If we get the next 3 we get an empty list but it's just we out there for now.

And we are connected.

Ok. That is all for now.

Không có nhận xét nào:

Đăng nhận xét