![]() |
open and closable level
hey, i know most of you got annoyed because i was asking for scripts that were wayyy above my scripting level, so iv decided to stick to easier things for now, basicly what iv tried to make is a door that if u write /open and your account is allowed to it will alloe you to enter the level when you touch it but if the account writes /close it closes it and you cant enter the level..
here is what i have so far.. the account and /open and /close work but i cant get the if playertouchsme bit to work.. as for the player.chat once i get it working il change that to setlevel2("level.nw",30,30); PHP Code:
Thanks -Gunderak |
Quote:
|
im new to scripting, please dont mock me :(
|
if (playertouchsme) { } is GS1. Don't mix the two up. You have to use:
function onPlayerTouchsMe() { } You've also made it impossible to occur by placing playertouchsme in your onPlayerChats function/event. PPNL: You have no idea what you're doing either. |
Quote:
PHP Code:
|
You'll want to do it serverside, not clientside. Otherwise, the door would only be open for you, and you'd have to trigger serverside to warp the player into the level (and serverside would have no way to verify that the door was legitimately opened).
|
I think this should be good enough for him since he wanted to start slowly :) and probably he´d have placed a normal warp behind the door...
|
Instead of attempting to shove scripts together then posting on the forums asking why they don't work, why not take the time to learn the basics of the language?
Learning simple structure and syntax is the first thing to learning a new language... You wouldn't try to learn German by shoving random sentences together and hope they produce what you want... There are a lot of resources available, if you would actually look. GS2 Wiki Old Wiki (But has some things the new one doesn't) Look through the code gallery at other people's scripts to get a good idea of what GS2 is, then try writing some basic code. (Note: I did not say copy/paste the codes, that would be pointless. Read through them and try to understand what they are doing) |
YAY finally got it working..
thanks all who helped =D one quick question, how would i make the room dark? like as if u were in a cave... Thanks -Gunderak |
Quote:
In case you are just out for commands: GS2 commands In case you need complete codes: Code Gallery |
Quote:
|
| All times are GMT +2. The time now is 11:19 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.