Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-24-2009, 04:11 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
You should really indent your code, it helps us (and you) read the script easier,.

Basically the GS2 equivalent is:

PHP Code:
function onWeaponFired()
{

  
play("put.wav");
  
player.bombs--;

  if (
player.dir == 0) {
    
temp.putnpc2(player.0.5player.1"");
    
temp.i.join("classname");
  }
  else if (
player.dir == 1) {
    
temp.putnpc2(player.1.5player.1"");
    
temp.i.join("classname");
  }
  else if (
player.dir == 2) {
    
temp.putnpc2(player.0.5player.2.5"");
    
temp.i.join("classname");
  }
  else if (
player.dir == 3) {
    
temp.putnpc2(player.2.5player.1"");
    
temp.i.join("classname");
  }


Now all you have to do is add the script for the bomb inside the class from the .txt file.

Also, it should be:
serverwarp(this.selectedserverconnect);
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:15 AM.


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