Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Speed script help! This time I have the script =] (https://forums.graalonline.com/forums/showthread.php?t=83739)

[email protected] 01-17-2009 08:19 PM

Speed script help! This time I have the script =]
 
1 Attachment(s)
Ok, so I have this problem with my script. It makes the player default speed faster, or slower if you choose. This is the problem though, whenever I use it, it makes me faster, but it disables my weapons. This is a big problem because my server is going to be a gun server and I need my weapons to be enabled. So to be clear, the problem is that I cannot equipt weapons with this script.

Someone please help me



Thanks

-Jamerson

xXziroXx 01-17-2009 08:28 PM

PHP Code:

disabledefmovement(); 

That one disables default movement and systems, Inventory included.

[email protected] 01-17-2009 08:31 PM

I deleted that, and it just like made me invisible. How can I fix this?

[email protected] 01-17-2009 08:32 PM

Do I do this?

enabledefmovement();

xXziroXx 01-17-2009 08:36 PM

Uh, no. Use your previous script, and when the player presses D (that's the button to use weapons, right?) trigger onWeaponFired() on the selected weapon.

[email protected] 01-17-2009 08:43 PM

Is there like an easier way to just set the default speed of the player without the feature of my script?

Just like a

this.speed = 0.6;

Just a simple script that makes the player faster.

xXziroXx 01-17-2009 08:47 PM

Not yet, no.

Quote:

Originally Posted by Stefan (Post 1449426)
There is a player.defaultwalkspeed in the next Graal version although like some people said before you can't make the player faster than "1" (default is 0.5), for that you would need a custom walk system like on Era or Zone.


[email protected] 01-17-2009 08:54 PM

I dont mind making it 1. Like Stefan said "There is a player.defaultwalkspeed in the next Graal version although like some people said before you can't make the player faster than "1" (default is 0.5), for that you would need a custom walk system like on Era or Zone."

What is the player.defaultwalkspeed script?

I dont care setting it to 1.

Chompy 01-17-2009 09:20 PM

Quote:

Originally Posted by [email protected] (Post 1457745)
Ok, so I have this problem with my script.

Your script? You should use your words more wisely next time. That script was made by Dusty.

Anyways, I'd suggest you make a custom weapon system, that would do something like..

PHP Code:

player.weapons[selectedweapon].trigger("WeaponFired"0); 

Then make an inventory who alters the selectedweapon variable..

Quote:

Originally Posted by [email protected] (Post 1457756)
I dont mind making it 1. Like Stefan said "There is a player.defaultwalkspeed in the next Graal version although like some people said before you can't make the player faster than "1" (default is 0.5), for that you would need a custom walk system like on Era or Zone."

What is the player.defaultwalkspeed script?

I dont care setting it to 1.

player.defaultwalkspeed is a variable that you can edit with a script.

Switch 01-17-2009 10:27 PM

Quote:

Originally Posted by [email protected] (Post 1457745)
Ok, so I have this problem with my script.

This isn't your script. You don't even know what variables are.

Quote:

Originally Posted by [email protected] (Post 1457753)
this.speed = 0.6;

this.something is only read by a script, not the whole client. :noob:

Quote:

Originally Posted by [email protected] (Post 1457756)
What is the player.defaultwalkspeed script?

It's a variable, not a script. :oo:

cbk1994 01-18-2009 01:07 AM

Use the onKeyPressed() function to tell when the "D" key is pressed, then you need to trigger the weapon, as Chompy posted.

Pelikano 01-18-2009 12:00 PM

Someone close this.

Dan 01-18-2009 04:03 PM

Quote:

Originally Posted by [email protected] (Post 1457745)
...

That looks a lot like the bomy island movement system, some parts are similar done.

Chompy 01-18-2009 04:20 PM

Quote:

Originally Posted by Dan (Post 1457958)
That looks a lot like the bomy island movement system, some parts are similar done.

Well, he didn't make it :o That's for sure.


All times are GMT +2. The time now is 08:19 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.