Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-11-2014, 02:22 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
GS2 Equiv of exploded?

Okay so in GS1 there was a event for when an object is exploded by a classic bomb.

PHP Code:
if (exploded)
{

I don't see one in GS2 tho... is there any way to still detect if it was hit by a bomb's explosion?
Reply With Quote
  #2  
Old 10-11-2014, 08:25 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Are default bombs even still working/supported? I suggest making your own, to be honest.
__________________
Reply With Quote
  #3  
Old 10-11-2014, 09:40 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Crow View Post
Are default bombs even still working/supported? I suggest making your own, to be honest.
They do still work and are supported. I agree should make your own and I do have my own. But my own still makes an explosion and that explosion is still not detectable. On top of that you cannot name your npc's Bomb, or Bow. Because doing so wont work as the default systems will override them and cause some pretty epic failures in some cases. =/

Edit: thanks deas.. aparently onExploded() works.. but it's clientside only.. and it doesnt show up in /scripthelp in rc.. o.O

Last edited by scriptless; 10-11-2014 at 10:07 AM..
Reply With Quote
  #4  
Old 10-11-2014, 01:42 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Makes sense, all bombs are client based.
__________________
Reply With Quote
  #5  
Old 10-11-2014, 02:21 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
if you have scripted your own bomb, why not script your own explosion as well?
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #6  
Old 10-12-2014, 01:01 AM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is just really niceMysticalDragon is just really nice
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Would be really easy to do then you can control the radius of your bomb detection.

PHP Code:
this.radius 3;
function 
onExplode2() {
  
attackObjects(this.x+1.5 ,this.y+1.5this.radius);
  
putNPC2(this.0.8this.0.6"join explosion;"); //Animation of your explosion
}

function 
attackObjects(tx,ty,radius) {
   for (
temp.objfindareanpcs(tx-radius,y-radius,radius*2,radius*2)) {
    
temp.npcdist = ((this.x+1.5-tx)^+ (this.y+2-ty)^2) ^ 0.5;
    
temp.obj.trigger("attack""explosion" this.owner this.damage int(temp.dist)); //Trigger NPCs hit by explosion
  
}

 
  for (
temp.plfindnearestplayers(tx,ty)) {
    
temp.dist = ((temp.pl.x+1.5-tx)^+ (temp.pl.y+2-ty)^2) ^ 0.5;
    if (
temp.dist >= radius)
      break;
    if (
temp.pl != this.owner || level.isnopkzone != true){
      
temp.pl.onHit(this.owner.account this.damage int(temp.dist), "explosion"); //Hit Players (Damage Depending on how close to center of the blast)
  
}
 }

__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
Reply

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 07:52 PM.


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