![]() |
how can i tell a class to perform commands in a lag free efficient way?
the title tells it all :o
Since there are idiots out there i decided id make it simple for them... I am scripting an RTS server for graal. What would be the best way to tell a unit that its supposed to move? |
Read Stefan's documents?
|
Quote:
|
First, a class in Graal is just something like 'include' in C[++], so you should work on your question and add more detail to it.
Quote:
|
Quote:
|
Use 'with' my friend.
hint: npcscount-1 That is certainly one way of doing it |
but you cant call a function with that
|
Quote:
If I've interpreted your problem correctly, you want a way to tell a putnpc2-ed unit what to do. I'd suggest a combination of testnpc and with to reach the NPC and give it instructions accordingly. The NPC could idly wait for instructions to act upon or you could callnpc it to execute the instructions without having to wait. |
Quote:
|
You can use callnpc to call a flag that runs some code or calls a function (like in the gralats class).
|
lance could you please tell me how callnpc works?
|
I thought callnpc was made redundant.
|
Quote:
NPC Code:callnpc index,eventflag; calls the script of another npc (not immediatelly) |
Yes... what is eventflag though? what would it call in the npc?
like triggeraction calls action actionname |
Whatever you name 'eventflag' in the callnpc, that is what you use in the npc.
|
| All times are GMT +2. The time now is 08:54 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.