![]() |
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 |
is setfocus allowed??
no1 ever answered my Q about that. |
yes u can use setfocus on free PWs. Can you tell whats wrong with that code so far?
|
Re: Game Control
Quote:
lol sorry, i am joking...lol. (conspiracy i think...) |
lmao, he used the predefined showchar :D
|
Quote:
|
Does anyone have any idea how to fix this? Also would triggeraction work for detecting if one NPC hits the other?
|
Quote:
|
YES U CAN USE IT! LORIEL SAID ITS ALLOWED ON FREE SERVERS AND HES GM AND HE KNOWS AND YES IT IS I TELL YOU SO DONT ASK AGAIN.
LOL, any other questions? |
I deosnt matter now, sadly it was released withought consent from the new world staff, seeinga s how hey were jipped with 2k2 taking thier EXE and all, methinks the fetures will just be plucked away one by one until NW is just another Player World.
|
is this like robot wars or something??
|
1 Attachment(s)
Axe wars
see... |
first off, the character npc doesnt have a part that calls the timeout in it, so it wont work at all
|
1 Attachment(s)
Hmm... why does that look familiar?
*remembers* Oh yeah! |
well just woundering is there a point to tokenizing the string.. why not just put the string in the if statment..
and ya the time out.. |
Quote:
NPC Code: not sure about the syntax though but it would work something like that ... |
you might have to do this
NPC Code: i think that would work |
I think graal handles Real input literally. so you are trying to set the player prop of
#C#v(i) instead of #C0-4 =\ |
bah i was gonna make something like this for whatever im working on..
ohwhell :( |
Quote:
|
Quote:
and I didnt know about Tyhms game. Thats cool though cuz now I do know its possible =D |
Quote:
timereverywhere doesnt call timeouts in other npcs, well atleast i dont think so |
Quote:
|
I'm not sure, but I think timeout is local, the only thing I know about timeouts on this level is what is in the npcprogrammng.rtf
Quote:
|
Umm that basically says what I said. It does a timeout for everwhere online in that level...
|
lol..
timereverywhere just makes it so that every player gets the timeout instead of just the leader getting the time out.. |
Quote:
|
that would be correct
timereverywhere for all people in level, not all npcs |
so then how may I ask would controlling a NPC be possible from a certain area? Loriel did it on Londeroth
|
| All times are GMT +2. The time now is 03:50 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.