More moveable gates problem
#1

Hello there.I have a problem with my friends.We are recently putting moveable gates with commands like /opengate1 or /closegate1.The problem is that if we put their script in the gamemode, they are bugged(looks like the position of the gate when you type the command is different/broken).So we put them in a filterscript but if we put more than 3 moveable gates, then we meet bugs on them again.What can we do to create more than 3 moveable gates in our server without bugs?

Any ideas?
Reply
#2

Any codes? Any pics? Any MORE information about 'bugs'?
Reply
#3

pawn Код:
new antonispark

if (strcmp("/xXx", cmdtext, true, 10) == 0)
{
MoveObject(antonispark, 2615.85791016,2302.76464844,12.59370422, 5.00);
return 1;
}
This is a part of the script.I put the "new" on the top(the name of the gate) then I make the command to open the gate and another one to close it.At the moment we have three gates fully working.If we put another one, it will be bugged.
Example:

I put a new gate(which is bugged).I am going to the gate to check if it works.I am looking to it.Now I press the command to open the gate.But the gate doesn't go to the right position which I have told it to go.Although if I close it again, it will go to the right place.
Reply
#4

And, you're making new variables for every new gate I hope? and have you checked the coords at all? They might be the wrong ones?
Reply
#5

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
And, you're making new variables for every new gate I hope? and have you checked the coords at all? They might be the wrong ones?
Yes, I create different lines for each new gate.And my friend has checked the coords, they are right.
Reply
#6

Okay, because it's a problem with moveable gates, a picture would help alot.
Oh and is the gate rotating? according to your code it doesn't, just to let you know.
Reply
#7

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
Okay, because it's a problem with moveable gates, a picture would help alot.
Oh and is the gate rotating? according to your code it doesn't, just to let you know.
We don't make the gates rotating.The rotation number is the same in both commands and the map object.

I will post screenshots as soon as my friends create a gate so I take proof of the bug.
Reply
#8

You are never assigning the variable to an object.

Example
pawn Код:
new gate;

public OnGameModeInit()
{
    gate = CreateObject(params here);
    return 1;
}
Reply
#9

Quote:
Originally Posted by Walsh
Посмотреть сообщение
You are never assigning the variable to an object.

Example
pawn Код:
new gate;

public OnGameModeInit()
{
    gate = CreateObject(params here);
    return 1;
}
That goes where?Under the "new" on top of script?Please more details, I am not pro at scripting.
Reply
#10

Quote:
Originally Posted by NickTaSpy
Посмотреть сообщение
That goes where?Under the "new" on top of script?Please more details, I am not pro at scripting.
The "new" goes on top of the script.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)