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-27-2002, 12:13 PM
Echos Echos is offline
Banned
Join Date: Jan 2002
Location: Somewhere in Georgia for l33t schoolings
Posts: 1,286
Echos is on a distinguished road
Send a message via ICQ to Echos Send a message via AIM to Echos Send a message via Yahoo to Echos
Quote:
Originally posted by Python523
you could use disabledefmovement for the moving part, I'm working on something like that:
if (created)
{toweapons *Jagen Control System 1.0;
speed=.9;
setstring speed,.9;
timeout=.05;}
if (timeout)
{disabledefmovement;
timeout=.05;}
//Controling movements
if (keydown(0))
{setani walk,;
playerdir=0;
playery=playery-strtofloat(#s(speed))/10;}
if (keydown(1))
{setani walk,;
playerdir=1;
playerx=playerx-strtofloat(#s(speed))/10;}
if (keydown(2))
{setani walk,;
playerdir=2;
playery=playery+strtofloat(#s(speed))/10;}
if (keydown(3))
{setani walk,;
playerdir=3;
playerx=playerx+strtofloat(#s(speed))/10;}
I have two vars up there so when I get into NPCs that upgrade speed I could just do:
speed=strtofloat(#s(speed))+.1;

setstring speed,#v(speed);
I divided the thing by 10 because graal was reading the .9 as 9 so I had to divide =/
[Kaimetsu]

So... horribly... inefficient... You could drop that to maybe 8 lines.

[/Kaimetsu]
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 01:18 AM.


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