![]() |
Trigger not receiving
1 Attachment(s)
Does anybody have any idea as to why this trigger is not receiving? This is a class npc and there is another class npc that uses the same format to send/receive triggers and it does work, yet I find this one does not.
Any help would be greatly appreciated and for convenience, I have instead of just typing it out made it a colour-coded image: Quote:
|
Ok. Suddenly when there was another player with me, the trigger started being received properly and now it works.
I don't understand how or why, but now you have a possible solution if you run into the same problem. |
[php] tags are probably the best for posting code with, just for future reference. Glad you sorted it, although that is slightly odd.
|
I'm not really sure how to use php tags. The image is for looking at, and I copied and pasted the actual text in case somebody wanted to test it out on their server. For formatting large script pieces, I just run stuff through the offline script editor and press format.
Unfortunately, another piece of code isn't working. The setshape2 doesn't work (well, it works under the //#CLIENTSIDE, but I want it to work above that) if you guys have any other insight. The destroy command works, so the variable IS being sent. Just the setshape commands aren't working. Thanks again. |
setshape2 is clientside only, I believe
|
So in order to make it so if the chair is set to sitting, everybody would sit in it, I would have to make a serversided boolean for the chair that would be triggered when a player gives a command and would be called whenever a player touches it? Seems like a bit of lag just for a single chair ;/
|
lol well you could set a index with the chair so if any player touchs it it becomes "sittable"
|
If I wanted that, I would make it sittable on creation. I want to make it kinda like Animal Crossing. The furniture can either be in movement mode or action mode. In action mode, you'd be able to sit in it. For a bed, you'd lie down in it. Etc.
Right now, the chair is a class npc that's spit out by another class npc (a lumber to chair machine). Businesses are going to buy these machines that produce various things (in exchange for raw materials of course) and produce the goods to sell to players. Smart players will be able to organize and operate the businesses while not-as-intuitive players will just be labourers working for the business, harvesting resources (lumber, minerals, etc). Couple this with a finite set of money, and this will be Graal's first economy, as far as I know. |
Sounds cool, the server I work for has a idea similiar. you could use variables
if (this.foo == 1) { blah blah blah; } if (this.foo == 2) { blah blah blah; } |
I thought I already was using variables.
|
*more variables, i should of said XP
|
You could always make two classes for 'action mode' and 'movement mode' and do something like this to switch between the two:
PHP Code:
|
| All times are GMT +2. The time now is 10:03 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.