Graal Forums  

Go Back   Graal Forums > Development Forums > Gani Construction
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-12-2009, 07:39 PM
johny023 johny023 is offline
Registered User
Join Date: Dec 2006
Posts: 36
johny023 is on a distinguished road
Question help with the size of animations?

well to make a long story short, i was trying to make a wall that npcs will attack, and the only way i could get it to work is if i put the "showcharacter" trigger in the script and to do that the wall had to be a animation... but when i turned the wall into a animation the actual size of the npc is only about 3/4th of the size of the image, so a fourth of the wall doesn't block...

how do i change the size of a animation so the npc will be as big as the image?

and i did try to use the "setshape" trigger, it didn't do anything

Last edited by johny023; 01-12-2009 at 07:44 PM.. Reason: * and i did try to use the "setshape" trigger, it didn't do anything :(
Reply With Quote
  #2  
Old 01-12-2009, 11:35 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
In the GANI, add (edit with Notepad):

PHP Code:
SCRIPT
//#CLIENTSIDE
if (created || playerenters) {
  
setshape 1WIDTH_OF_IMAGEHEIGHT_OF_IMAGE;
}
SCRIPTEND 
Or if you don't need it to work offline,

PHP Code:
SCRIPT
//#CLIENTSIDE
function onCreated() {
  
setshape(1WIDTH_OF_IMAGEHEIGHT_OF_IMAGE);
}
function 
onPlayerEnters() {
  
onCreated();
}
SCRIPTEND 
__________________
Reply With Quote
  #3  
Old 01-13-2009, 07:36 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
hmm- (width of image/ height of image) / 16
Reply With Quote
  #4  
Old 01-13-2009, 08:27 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
I'm pretty sure you can't change the shape of a gani in any way.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #5  
Old 01-14-2009, 01:57 AM
johny023 johny023 is offline
Registered User
Join Date: Dec 2006
Posts: 36
johny023 is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
In the GANI, add (edit with Notepad):

PHP Code:
SCRIPT
//#CLIENTSIDE
if (created || playerenters) {
  
setshape 1WIDTH_OF_IMAGEHEIGHT_OF_IMAGE;
}
SCRIPTEND 
Or if you don't need it to work offline,

PHP Code:
SCRIPT
//#CLIENTSIDE
function onCreated() {
  
setshape(1WIDTH_OF_IMAGEHEIGHT_OF_IMAGE);
}
function 
onPlayerEnters() {
  
onCreated();
}
SCRIPTEND 
i tried both of those, but neither of them worked, do i need to put them in a specific place in the notepad?
Reply With Quote
  #6  
Old 01-14-2009, 02:03 AM
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
I think the bigger problem people should be considering is the fact that you have to showcharacter() in order to get it to take damage.

Let's see the script.
Reply With Quote
  #7  
Old 01-14-2009, 05:18 AM
johny023 johny023 is offline
Registered User
Join Date: Dec 2006
Posts: 36
johny023 is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
I think the bigger problem people should be considering is the fact that you have to showcharacter() in order to get it to take damage.

Let's see the script.
sorry, was trying to avoid a wall of text in first post. it takes damage it's just that the npcs won't attack it unless i have "showcharacter" in it's script. it's like they can't see it unless i add that bit in, i find that a bit strange since i didn't have to do that with other npcs... but here's the script anyway, maybe someone could just tell my why the npcs don't attack it.

this is for the offline editor.
sorry about it not being neat, and i know some things may be scripted strangely.. but everything i learned about scripting i learned from pressing random buttons. didn't know about the forums until a few years after i got the editor.

PHP Code:
// NPC made by John
if (created) {
  
showcharacter;
setcharani wall,;
hearts 1;
this.hp player_carpentry_lv*100;
}

if (
timeout){
message #v(this.hp);
}

if (
actionattack && this.hp>0) {
  
this.sdamage random(player_weaponpower,player_weaponpower*10);
  
this.stdamage random(player_strengthlv,player_strengthlv*5);
  
random(0,100);
  if (
i<10this.hp -= (player_weaponpower*20 player_strengthlv*10);
  if (
i<10play critical.wav;
  else if (
i<100this.hp -= this.sdamage this.stdamage;
}

if (
actionshot && this.hp>0) {
  
random(0,100);
  if (
i<10this.hp -= bulletpower*10;
  if (
i<10play critical.wav;
  else if (
i<100this.hp -= bulletpower;
  
shot 3;
  }

if (
actionfire2 && this.hp>0) {
  
this.hp -= firepower2;
  }

if (
actionwater2 && this.hp>0) {
  
this.hp -= waterpower2;
  }

if (
actionearth2 && this.hp>0) {
  
this.hp -= earthpower2;
  }

if (
actionlightning2 && this.hp>0) {
  
this.hp -= lightningpower2;
  }

if (
actionlight2 && this.hp>0) {
  
this.hp -= lightpower2;
  }

if (
actiondark2 && this.hp>0) {
  
this.hp -= darkpower2;
  }

if (
actionmana2 && this.hp>0) {
  
this.hp -= manapower2;
  }

if (
actionattack2 && this.hp>0) {
this.hp -= attackpower;
}

if (
this.hp<=&& timeout){
play explode1.wav;
play explode2.wav;
play explode3.wav;
destroy;
}

timeout 0.05
if anyone knows how to change the size/shape of a gani (if it's possible) or why the npcs won't attack it if it doesn't have "showcharacter" the help would be appreciated

Last edited by johny023; 01-14-2009 at 05:38 AM..
Reply With Quote
  #8  
Old 01-14-2009, 05:21 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by johny023 View Post
but everything i learned about scripting i learned from pressing random buttons.
Aaah, good old days. Welcome to the club.

Quote:
Originally Posted by johny023 View Post
if anyone knows how to change the size/shape of a gani (if it's possible) or why the npcs won't attack it if it doesn't have "showcharacter" the help would be appreciated
As I previously stated, I wasn't aware of a way to do that. It appears I might be eluded about it though?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #9  
Old 01-14-2009, 05:42 PM
johny023 johny023 is offline
Registered User
Join Date: Dec 2006
Posts: 36
johny023 is on a distinguished road
what i don't understand sometimes the shape of the animation changed to fit the image and sometimes it didn't. for this image it just won't change >.< but i did take your post into consideration, and i'm starting to think i can't change the shape of the animation.

do you notice anything in the script that would make it so npcs won't attack it? or is that just graal being glitchy again?
Reply With Quote
  #10  
Old 01-15-2009, 05:38 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by johny023 View Post
what i don't understand sometimes the shape of the animation changed to fit the image and sometimes it didn't. for this image it just won't change >.< but i did take your post into consideration, and i'm starting to think i can't change the shape of the animation.
I think it depends on the amount of transparency in the image, as well as it's width and height.

Quote:
Originally Posted by johny023 View Post
do you notice anything in the script that would make it so npcs won't attack it? or is that just graal being glitchy again?
No, I didn't, but I lack the patient to figure out GS1 scripts nowadays I'm afraid. Especially poorly styled ones.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #11  
Old 01-15-2009, 06:26 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
NPCs won't attack because I'm assuming you're using pre-defined character scripts in the editor, and they're scripted only to attack other players(showcharacter renders them a 'player').
Reply With Quote
  #12  
Old 01-16-2009, 04:59 AM
johny023 johny023 is offline
Registered User
Join Date: Dec 2006
Posts: 36
johny023 is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
NPCs won't attack because I'm assuming you're using pre-defined character scripts in the editor, and they're scripted only to attack other players(showcharacter renders them a 'player').
so if i re-script it on one of those blank npcs it should work? or are those pre-defined also?
Reply With Quote
  #13  
Old 01-16-2009, 05:02 AM
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
Quote:
Originally Posted by johny023 View Post
so if i re-script it on one of those blank npcs it should work? or are those pre-defined also?
If you're starting and NPC from scratch, it will do what you tell it to. If you tell it to attack all NPC's, it will. If you tell it to attack all NPCs that have save[0] true, then they will. So on and so forth.
Reply With Quote
  #14  
Old 01-17-2009, 02:02 AM
johny023 johny023 is offline
Registered User
Join Date: Dec 2006
Posts: 36
johny023 is on a distinguished road
ok, thanks for the help everyone.
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 Off
HTML code is Off

Forum Jump


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


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