Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-07-2002, 06:48 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
Game Control

I am making a game where there are 2 buttons. when a player grabs one it sets focus on a area and they control one of the 2 NPCs inside there.

My code so far looks like this...

// NPC made by Lord Helmut
if (created) {
x+=.4;
y+=.7;
}
if (playertouchsme&&keydown(6)) {
setstring server.axegameplayer,#a;
setfocus 31,28;
disabledefmovement;
playersprite=19;
say2 Do you want to play?;
timereverywhere;
}

Thats the code so far for the button. For some reason u have to hold A and run at it to get it to work LOL.

// Graal2002 NPC by Stefan Knorr
if (created) {
showcharacter;
setcharprop #3,head0.png;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,noshield.gif;
dir = 3;
}
if(timeout){
tokenize #s(server.axegameplayer);
if(strequals(#a,#t(1))){
if(keydown(3)){
x+=5;
timeout=.05;
}
timeout=.05;
}
}

Thats the character NPC. I want it so it can be controlled by the player touching to button but its not working for some reason
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
 


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:36 AM.


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