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 02-03-2002, 04:21 PM
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
Waiting...

Would it be possible, maybe like on the old multiplayer games to make it so if one player starts an event (2p event) a message pops up saying waiting... and it waits for another player to join? I was just thinking how cool that would be
Reply With Quote
  #2  
Old 02-03-2002, 04:35 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
most likely if you set some variables. something like this:

if (playerchats&&strequals(#c,play event)){
if (this.player==0){
this.playery+=1;
message Waiting for next player.;
} else if (this.player==1){
this.player+=1;
message 2 players are now in.
doEvent();
}
}
function doEvent(){
<your event here>;
}

Most likely something like that
or you could use setstring.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #3  
Old 02-03-2002, 05:51 PM
aller05 aller05 is offline
Registered User
Join Date: Jan 2002
Location: Ohio
Posts: 76
aller05 is on a distinguished road
it wud
__________________
tha Drakken
"enough said"


Lose Respect....
And You Die



Reply With Quote
  #4  
Old 02-03-2002, 11:29 PM
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
whats the code to check the current gani of the player?
Reply With Quote
  #5  
Old 02-04-2002, 01:33 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by lordhelmut
whats the code to check the current gani of the player?
try strequals(#m,)
Reply With Quote
  #6  
Old 02-04-2002, 01:49 AM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
i have fun with this code!
if (created){
toweapons -ani checker;
timeout=0.05;}
if (timeout){
setplayerprop #c,#m;
timeout=0.05;}
its simple but ammusing
__________________
Reply With Quote
  #7  
Old 02-04-2002, 11:12 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
Quote:
Originally posted by Goboom
i have fun with this code!
if (created){
toweapons -ani checker;
timeout=0.05;}
if (timeout){
setplayerprop #c,#m;
timeout=0.05;}
its simple but ammusing
*amuses self with silly NPC for hours on end*
Reply With Quote
  #8  
Old 02-04-2002, 11:15 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
SetFocus

I think there are SetFocus problems...

i did this...

// NPC made by Lord Helmut
if (created) {
x+=.4;
y+=.7;
}
if(playerenters){
timeout=.05;
}
if (playertouchsme&&keydown(6)) {
setfocus 31,28;
disabledefmovement;
playersprite=19;
}
if (timeout&&keydown(5)) {
resetfocus;
enabledefmovement;
timeout=.05;
}

no matter what I try I cant get it to unset the focus and for some reason u have to hold A and run at the NPC for it to setfocus =/
Reply With Quote
  #9  
Old 02-04-2002, 11:22 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
for now its a image (button) on a wall and if they touch it and hit a its supposed to setfocus and if they hit s it needs to unset the focus but its not working =/
Reply With Quote
  #10  
Old 02-04-2002, 11:36 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
o damn, is that easy to fix?
Reply With Quote
  #11  
Old 02-04-2002, 12:02 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
better:
NPC Code:

timeout=0.05;
if (playerenters){
toweapons -ani checker;
if (timeout)
timeout=0.05;
setplayerprop #c,#m;



i dunno y i posted that, but i love it...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #12  
Old 02-04-2002, 12:05 PM
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
Quote:
Originally posted by Kaimetsu


Sure, there are lots of ways around it. Wait for a playertouchsme and then keep some sort of potentia ready for if they do press A, removing it if they move, maybe. Monitor A and whenever it is pressed check if the player is close enough to the button for him to press it, possibly. There are lots of ways. I'd personally advocate the latter, but I'm just giving you options.
only way i can think of is to put some kind of timeout maybe that checks if they are touching it and pressing a?
Reply With Quote
  #13  
Old 02-05-2002, 12:18 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
yay! i will help ya out lh.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
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 09:08 AM.


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