putnpc; doesn’t work for me online, just offline. Can someone help me?
Anyways is there a other way of putting a NPC (triggeractions)


if (playerdir == 0 && keypressed && keydown2(keycode(s),true)) { message #v(int(random(0,2))); putnpc lightarc0.png,Script1.txt,playerx-0.5,playery-random(1,3); }


message Worked!;
sleep 1;
message Awesome!;
sleep 1;

timeout = 0.05;

A few things:

  • the script1.txt should be in your world folder and your folder config should point to that folder for text files if doesn’t already
  • you need to call timereverywhere prior to actually calling a timer or sleep for all players to be able to run the timer
  • it’s probably a good idea to surround your code with an event such as playerenters i.e.
if ( playerenters) {

Well since it is a npc that will be created if(created) would make more sense here. Instead of if(playerenters).

A valid point but you’re failing to consider what happens when the controlling player(i.e. the client on which the script is executing) leaves the level. The npc would become stuck and no longer be destroyed.

Still not working. Hmm