Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-18-2005, 01:10 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Setshape is working perfectly, shoot too, using it a lot on Zone. Eventually post some script parts.
Older versions of the npcserver couldn't access playerz/player.z, but that has been fixed some weeks ago.
Reply With Quote
  #2  
Old 03-18-2005, 08:52 PM
Velox Cruentus Velox Cruentus is offline
Registered User
Velox Cruentus's Avatar
Join Date: Dec 2004
Location: Quebec, Canada
Posts: 465
Velox Cruentus is on a distinguished road
Send a message via ICQ to Velox Cruentus Send a message via AIM to Velox Cruentus
This sums it.
PHP Code:
//#CLIENTSIDE
function onWeaponfired()
{
this.angle := playerdir==3?0:(playerdir+1)*1.57;
this.angle += random(-this.defprop[6],this.defprop[6]);
player.chat := "Bang!";

this.:= this.defprop[9][player.dir][0] + vecx(player.dir)*random(-this.defprop[6],this.defprop[6]);
this.:= this.defprop[9][player.dir][1] + vecy(player.dir)*random(-this.defprop[6],this.defprop[6]);

shoot player.x-this.x,player.y-this.y,player.z,this.angle,0,0,era_shotgun-bullet,;
shoot(player.x-this.x,player.y-this.y,player.z,this.angle,0,0,"era_shotgun-bullet.gani","");

That goes doesn't work. The player does say "Bang", but no projectile.

PHP Code:
function onCreated(){
  
setshape(1,32,32);

That doesn't work as well.

EDIT:

Apparently, Shoot works, though that projectile in particular doesn't work. So! I'll find the solution on my own. -- -- Found it. I don't know what was the problem, however. I do believe it's just the using this.x and this.y in weapons are read-only. Thus my projectiles didn't go well.

Last edited by Velox Cruentus; 03-18-2005 at 09:35 PM..
Reply With Quote
  #3  
Old 03-20-2005, 03:52 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
"this.x" and "this.y" are redirecting to "x" and "y" and are special for weapons, so I wouldn't use them for storring temporary data. For the shoot command don't add the ".gani" to the ani parameter (the last 2 parameters are exactly like for the setani/setcharani commands).
The setshape should work though, its working on Zone, otherwise you couldn't use the teleporters. I can check it again if I have time though.
Reply With Quote
  #4  
Old 03-20-2005, 05:22 AM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
Quote:
Originally Posted by Stefan
"this.x" and "this.y" are redirecting to "x" and "y" and are special for weapons, so I wouldn't use them for storring temporary data. For the shoot command don't add the ".gani" to the ani parameter (the last 2 parameters are exactly like for the setani/setcharani commands).
The setshape should work though, its working on Zone, otherwise you couldn't use the teleporters. I can check it again if I have time though.
try it clientside, it should be creating a blockable region of the specified area but it does not for me

PHP Code:
function onCreated() {
  
setimg("block.png");
}
//#CLIENTSIDE
function onCreated() {
  
setshape(1,64,64);

the blockable region should extend past the block image by 2 tiles
__________________

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 10:45 PM.


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