Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-18-2012, 11:46 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Shoot inherits basic gani properties. In this case you can just set the graphics in the gani for each direction and they will be set automatically when fired. You can also simplify the script like so:

PHP Code:
if (weaponfired) {
  
freezeplayer 0.6;
  
setani shoot,woodenbow1.png;
  
sleep 0.2;
  
shoot playerx-0.8,playery+0.5,2,pi/2*playerdir,0,0,eman_woodenarrow,;

Reply With Quote
  #2  
Old 06-18-2012, 11:59 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Quote:
Shoot inherits basic gani properties. In this case you can just set the graphics in the gani for each direction and they will be set automatically when fired. You can also simplify the script like so:

PHP Code:
if (weaponfired) {
freezeplayer 0.6;
setani shoot,woodenbow1.png;
sleep 0.2;
shoot playerx-0.8,playery+0.5,2,pi/2*playerdir,0,0,eman_woodenarrow,;
}
Making the script shorter is cool, but that is not the problem I have, I need to know what the variables in the command "shoot" are, and I need to figure out why is it when I shoot only left, it is transparent, and I need to figure out how to injure npc baddies. Also that script that you said shoots weird, if you shoot left, the arrow up, if you shoot up, the arrow goes right, it goes one direction more clockwise than it should.

(Btw, how do you put a script in a PHP Code box?)
Reply With Quote
Reply


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 03:59 PM.


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