Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-11-2012, 02:25 AM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Custom bombs / images?

Hi i'm trying to create a custom bomb system on Esteria and I was wondering how I could customize putbomb? I tried Putbomb2 and it seems to only place a shadow. Any ideas? thanks!

Edit:
Script help for 'putbomb2':
TServerLevel.putbomb2(int, float, float, str) - adds a classic bomb with the specified power, x, y and image (default bomb1.png)

When trying that, when I try making it our bomb image, it defaults to a shadow.
Reply With Quote
  #2  
Old 01-11-2012, 03:05 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Are you calling it on the server-side?

Please post your actual code so we can help debug it for you.
__________________
Quote:
Reply With Quote
  #3  
Old 01-11-2012, 03:14 AM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Well for now, i'm just trying a normal bomb onCreated,
PHP Code:
//#CLIENTSIDE
function onCreated() {
   
putbomb2("bomb1.png",30,30);

edit, sorry heres my script:
PHP Code:
//#CLIENTSIDE 
function onCreated() { 
   
putbomb2(2,30,30"bomb1.png"); 

Reply With Quote
  #4  
Old 01-11-2012, 03:24 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I believe putbomb2 version you're trying to use is server-side only.

Try:

PHP Code:
function onActionServerSide() {
  if (
params[0] == "bomb") {
    
// This should work
    
player.level.putbomb2(23030"bomb1.png");
    
// This also might work
    
putbomb2(23032"bomb1.png");
  }
}

//#CLIENTSIDE
function onCreated() {
  
triggerserver("gui"this.name"bomb");

__________________
Quote:
Reply With Quote
  #5  
Old 01-11-2012, 03:33 AM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
I believe putbomb2 version you're trying to use is server-side only.

Try:

PHP Code:
function onActionServerSide() {
  if (
params[0] == "bomb") {
    
// This should work
    
player.level.putbomb2(23030"bomb1.png");
    
// This also might work
    
putbomb2(23032"bomb1.png");
  }
}

//#CLIENTSIDE
function onCreated() {
  
triggerserver("gui"this.name"bomb");

Your script actually works clientside, thank you!
Reply With Quote
  #6  
Old 01-11-2012, 04:08 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Alpho View Post
Your script actually works clientside, thank you!
Great.

Please post the final working script for others who may have the issue in the future.
__________________
Quote:
Reply With Quote
  #7  
Old 01-13-2012, 01:10 AM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
Please post the final working script for others who may have the issue in the future.
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/bombtest") {
    
putbomb2(1player.xplayer.y"bomb1.png");
  }

Reply With Quote
  #8  
Old 01-21-2012, 04:25 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Or for even more customization you can make a class for each bomb and lay a class in the level and have it wait a few seconds and the bomb explodes
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #9  
Old 01-21-2012, 05:17 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Astram View Post
Or for even more customization you can make a class for each bomb and lay a class in the level and have it wait a few seconds and the bomb explodes
Which is overkill if the default system suits your needs.
__________________
Quote:
Reply With Quote
  #10  
Old 01-21-2012, 09:29 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
Which is overkill if the default system suits your needs.
*cough*iPhone Graal*cough*

Ugliest bomb system known to man, and they don't even predict the bomb placement clientside. Even my custom bomb system did that on Graal 2.17.

gg, iPhone scripters.
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 02:20 AM.


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