![]() |
SImple Problem
Hey its me again, Try my hand on scripting Im getting the basics down but for some reason I am having trouble with this simple flag. Here is the first script:
PHP Code:
PHP Code:
|
God it hurts me just to look at GS1 now that I've been working with GS2 for so long >_<
Are both parts in the same script? If not I don't think it would work because the flag would only be setting for that one script, and thus the other wouldn't be able to read it. |
Don't really understand what you're trying to do... Could you explain it? I guess it has something to do with the save[x]'s... but I don't understand what.
From reading a little. I guess you have an NPC that will walk to a door and open it? If that's the case, use triggeractions, not save[x]'s. PHP Code:
PHP Code:
|
Quote:
|
Still doesnt work. Remember Im a noob at scripting you might have to explain some things XD
|
Quote:
|
I answered this in your other thread... re-read?
http://forums.graal2001.com/forums/s...09#post1285014 |
Im a noob at scripting I have no idea what all those commands mean. Please explain.(I dont know what to change to make it work or anything :( )
|
PHP Code:
PHP Code:
Then, inside the door add the other script. You'll see how it works. |
Quote:
PHP Code:
PHP Code:
this method should work fine after that. I can't believe all these FOOLS posting pointed you torwards triggeraction and completely overlooked that :D jk ILU guys |
Quote:
|
Quote:
Alternately the door could be scripted in gs2! PHP Code:
PHP Code:
|
Quote:
Besides, for all intensive purposes, he asked why his script did not work, not how to do it a better way. |
== is not required.
= works just fine. |
Quote:
= may have worked in GS1, but it acts a lot differently (as it should) in GS2. For example: PHP Code:
PHP Code:
|
If the two scripts are in seperate NPCs, you just can't check save[0] from the other npc with save[0]==1. save[0] is local to the NPC, so you'd either have to get the NPC index for npcs[x].save[0]==1 or triggeraction the other NPC...
Now... if they're in the same NPC than triggeraction would be a silly solution. Anyways, I see in his first post he corrected and captioned the second NPC is a door. In that case save[0]==1 will not work since save[x]'s are a local variable. Triggeraction is the right solution for NPC's interacting. |
Quote:
|
True, true... in GS2. But he posted a GS1 script and I responded with a GS1 solution. In GS1, triggeraction is the most sensible solution.
|
Quote:
The question has been answered id like to hear from him again to see if he managed to fix it with the advice he was given. |
1 Attachment(s)
Ok so first off thanks for all the help I did manage to solve it a different way.
I simply made the moving character drop the image of a stair case.(So it made it look like in magically appeared. The staircase had its own script with a drawunderplayer function and the player can now advance to the next level. I couldn't quite figure out the trigger action function because I don't see how you use x,y coordinates to make an npc dissapear :( Perhaps I'm doing something wrong. If someone could please correct what I have done wrong it would be a great learning experience for me :) |
Quote:
since this. was not use, the save[] array is accessable by all npcs on the clientside. Stop saying I am wrong when I am right please ^_^ |
Quote:
Maybe you were just getting impaitent but you had to wait 10 seconds (sleep 10;) before the triggeraction would happen. |
Quote:
PHP Code:
|
Quote:
|
Does triggeraction work in gs2? Its not working for me in this script
PHP Code:
|
Quote:
And hide == 0 PHP Code:
|
Quote:
compared to triggeraction(mousex, mousey, "owies", player.account, player.level.name); |
Quote:
PHP Code:
PHP Code:
|
Quote:
[Edit]: haha i frigged this one up |
Quote:
|
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 02:03 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.