![]() |
NPC Scripting
I wanna learn how to script but I have no idea where to start. Could someone please tell me or help me out?
|
read the commands.rtf to learn the basic syntax's
|
[Vlad]
Well start with if (playertouchesme) and (playerenters) flags and experiment with commands to see what they do. |
Quote:
|
i know like the basics if someone helps me a bit, like i can move stuff/slide and i can make it so you can sit on things XD none of that is hard but it is what i can do XD XD and i can make light2.png work 4 me XD
|
Quote:
|
Quote:
Try this script. NPC Code: And play in the level, and touch it. Nothing happens. |
find and read the Newbie Scripters Bible.
|
how i started was the npcprogramming.doc that comes with graal, although outdated, it is a good beginner's guide
|
NPC Code:// NPC made by Stefan Knorr Why did you put in "setshape 1,32,32" is that for serverside or sothing? Teach me.. |
because the npc server keeps no record of the shapes (blocking, etc) of NPCs
|
Quote:
|
Lets say I want to make a NPC that sells cans, but there is a limited supply of 30. Would I out this in the GScript?
NPC Code:while (flag&&count<30) |
Quote:
Suggestions: server.string or save[0]-save[9] I think both would work. |
Lets say I go aquire a flag to open a door that needs a certin flag named "sam" to enter the door. Would this script work for the door?
NPC Code:if (playertouchsme&&sam){hidelocal;sleep3;show |
All times are GMT +2. The time now is 06:59 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.