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 04-01-2007, 05:49 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
Baddies/compus gani's

I didn't know where to post this, here or in the gani section. I figure that since this is mainly to help scripters, I'd post it here.
As a little project I was starting for myself, I created gani's of the current soldier baddy. It's a little complex, but that's because of the fact that baddies can have head directions seperate from their body direction.

The baddy's image uses the NPC's head image, IE #3.
The head of the baddy must be shown using a showani. I was going to use it by setting P1, but I found that you can't pass parameters, which was needed(unless there is a way).
When showing the gani, the direction of the head is passed in the parameter as 0-3, like so:
NPC Code:
showani 0,x,y,dir,baddyhead,#v(headdir);


GS2:
NPC Code:
showani(0,this.x,this.y,this.dir,"baddyhead", this.headdir);

Attached Files
File Type: gani baddywalk.gani (1.7 KB, 157 views)
File Type: gani baddyhead.gani (1.3 KB, 166 views)
File Type: gani baddyidle.gani (1.5 KB, 138 views)

Last edited by DustyPorViva; 04-01-2007 at 08:12 AM..
Reply With Quote
  #2  
Old 04-01-2007, 06:37 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
What was "#v" in Gs1? :O
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #3  
Old 04-01-2007, 06:43 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
Oops, forgot to translate that over. Read variables. No idea how to pass the variable into the showani with GS2. So if someone know's how, please post the right code. For now I'll just edit it to GS1.
Reply With Quote
  #4  
Old 04-01-2007, 06:48 AM
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
GS1: message I have #v(this.var) apples!;

GS2: chat = "I have" SPC this.var SPC "apples!";
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #5  
Old 04-01-2007, 06:53 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
Ya, thing is I want to pass the variable as a parameter in the showani.
If I did
NPC Code:
showani 0,x,y,dir,baddyhead,headdir;


In gs1, it wouldn't pass the variable.
So I don't know how to make it correctly pass the variable in gs2.
Anyways, I'm sure if someone is going to use the gani's to script a baddy in GS2, they'd know how to convert the showani.
Reply With Quote
  #6  
Old 04-01-2007, 07:16 AM
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
PHP Code:
showani(0xydir"baddyhead.png"headdir); 
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #7  
Old 04-01-2007, 07:46 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
Ahh, makes sense now. Thanks , though shouldn't it be this.x, this.y, and this.dir?
Reply With Quote
  #8  
Old 04-01-2007, 07:48 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
showani(0,x,y,dir,baddyhead,headdir);
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #9  
Old 04-01-2007, 10:55 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by DustyPorViva View Post
Ahh, makes sense now. Thanks , though shouldn't it be this.x, this.y, and this.dir?
Depends on what object you are working with, for example a player.joined class would use this. as the current player, and this.joined would use the current class/npc
__________________
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 12:45 AM.


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