Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Help: Making a weapon (https://forums.graalonline.com/forums/showthread.php?t=134257191)

Dnegel 12-06-2009 01:29 PM

Ahhh, many thanks for that reminder. :)

Im thinking about making a script, when you press a button, you shoot.

Im currently now sitting left with this, but the ani wouldnt show, im sure it's something to do with the
if (buttonpressed) (d); .

PHP Code:

//#CLIENTSIDE

function onCreated()
{
  
functionTest();
   if (
buttonpressed)(d);
   
setani ("mp7-fire","");



Sage_Shadowbane 12-07-2009 10:21 PM

Quote:

Originally Posted by Dnegel (Post 1542880)
Ahhh, many thanks for that reminder. :)

Im thinking about making a script, when you press a button, you shoot.

Im currently now sitting left with this, but the ani wouldnt show, im sure it's something to do with the
if (buttonpressed) (d); .

PHP Code:

//#CLIENTSIDE

function onCreated()
{
  
functionTest();
   if (
buttonpressed)(d);
   
setani ("mp7-fire","");



You do know that making up your own events isn't going to work, correct? Like almost everyone has already told you, stop trying to depend on us. It's pretty obvious that you haven't even attempted to learn Gscript or you wouldn't be posting silly things like if (buttonpressed)(d);. That doesn't exist, and I'm pretty sure that it never will. So please, go and try to take atleast 10 minutes out of your time and read some scripting tutorials that are posted everywhere on these forums, than come back with a half way reasonable script which we can attempt to help me with. As for your script atm:

PHP Code:

//#CLIENTISIDE
function onKeyPressedkeycodekeyname ) {
  if ( 
keyname == "D" ) {

    
setani ("mp7-fire","");
  }


Something along the lines of that would be more suitable for what you're looking for. But please, don't just use the script I've posted for you, go and edit it adding two lines, than coming back here and asking for help again. ^^

Dnegel 12-08-2009 04:44 PM

Ahhh, finally someone wrote something * Puts hands togheter *

Great respond to. :)

Well, I guess your right, because you know this more than me. But I have actually read alot, but I guess I didn't have it all scheduled.

Now I got it all scheduled though, and I will actually find scripts lines that works.

Im starting fresh again.

Twinny 12-08-2009 05:09 PM

Quote:

Originally Posted by Dnegel (Post 1543235)
and I will actually find scripts lines that works.

If you only ever take lines of code without ever understanding how they work, you will just become another player world parasite destined to detriment future development. Read the Graal Bible, read the tutorials out there and learn to help yourself.

The graal forums do not support parasitic developers very long....Jigga is a good example of this.

Riot 12-08-2009 05:23 PM

Important thing to note: Do not have a space before the parenthesis.

setani ("mp7-fire",""); will invoke the GS1 form and attempt to set your ani to ("mp7-fire".gani

Remove the space so it becomes: setani("mp7-fire","");

Dnegel 12-08-2009 07:57 PM

Ahhh, thank you very much Riot for that fix.

And to you Twinny, I have read the tutorials. ;)

Samposse 12-10-2009 12:06 PM

Quote:

Originally Posted by Dnegel (Post 1543260)
Ahhh, thank you very much Riot for that fix.

And to you Twinny, I have read the tutorials. ;)


ye, i did to but didnt understand it so mutch :p


All times are GMT +2. The time now is 03:06 AM.

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