Jump to content

-Gus-

Members
  • Posts

    120
  • Joined

  • Last visited

Details

  • Location
    Argentina

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

-Gus-'s Achievements

Sucka

Sucka (13/54)

4

Reputation

  1. I found the solution, it seems that the map editor treats custom elements as objects (even if they are represented as vehicles or whatever) and rotations are different between objects and vehicles, so you need to convert the rotation from 'object format' to 'vehicle format'. One way to do that is creating a dummy object and setting its rotation to your custom element rotation, and then do getElementRotation(dummyObject, 'ZYX') to get the same rotation in 'vehicle format' (it's called ZYX format actually, and ZXY is for objects in case you wanna know)
  2. Hello everyone. I wasn't sure If I should post this here because it may not be 100% related to scripting, but I ran into this problem by making a script, so here it goes. I'm making a script that uses custom elements defined in an EDF file, and relies heavily on the rotation of those elements because it uses the "forward" vector of their matrices. The problem is that the rotation that the editor gives is somehow bugged, let me show you this with an example: Let's say I place one of my custom elements, which is represented within the editor with a vehicle, and set it's rotation to X=345, Y=180, Z=90. I get this: Now if I do the same with a normal vehicle, and set the exact same rotation I get this: Now if I click "OK" and then open the vehicle properties again, the rotation is changed! (this does not happen with my custom element, that one stays with the rotation I set) The problem is that if I calculate the "forward" vector for my custom element, what I get is what I would get if the rotation was the second one (in this example X=165, Y=0, Z=270), but that is not the rotation that the editor is showing me (neither visually or in the properties). And even worse: The rotation that I used as an example is the one I get if I rotate the element using the keyboard, I can manually set a different rotation (that gives the same visually) that works fine, but for UX reasons I can't tell my script's users to do that if they run into this bug. Here is the code that does the "forward vector" thing: saves[cshape]['pos'] = Vector3(autojumpEnd:getData('posX')),autojumpEnd:getData('posY')),autojumpEnd:getData('posZ'))) saves[cshape]['rot'] = Vector3(autojumpEnd:getData('rotX'),autojumpEnd:getData('rotY'),autojumpEnd:getData('rotZ')) saves[cshape]['vel'] = Matrix(saves[cshape]['pos'],saves[cshape]['rot']):getForward() * tonumber(autojump:getData('speed')) So my question is: Is this an editor bug? Is it something I'm doing wrong? How can I work this out? Any help is appreciated.
  3. Finally here is Needed Skill II We hope you like it!! 720p is advised
  4. One year and seven months after I released my V7 I recorded this map in 4 parts too Song: Modestep - Saved The World (xKore Remix)
  5. i have the same problem but if i add "https://" before the adress i dont get any alarm
  6. when I open a .lua file the background is black, it is white only when i have just created it using the script editor, but if i close and reopen it turns black, here's a pic
  7. i'm having the same problem and what i want to do isn't possible with arezu's toolbox or bauss' toolbox
  8. yo lo haria con SQL, creo la tabla con la lista de seriales que alguna vez entraron al server y las vidas que tienen. PD: para que un server tenga un script asi tiene que ser uno muy bueno, para que valga la pena el esfuerzo por no perder vidas, porque sino todos dirian "ah perdi una vida, no importa total el server es una mierda"
  9. ok i will try EDIT: it worked, thanks!
  10. i have the same crash than John_Scott when i start the resource: Version = 1.3.1-release-4710.2.010 Time = Thu Dec 27 23:49:55 2012 Module = C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll Code = 0xC0000005 Offset = 0x0003B9F0 EAX=00000000 EBX=1DFC42A0 ECX=00000000 EDX=20202039 ESI=0022F11C EDI=1E1A4DF0 EBP=0022F09C ESP=0022F090 EIP=7187B9F0 FLG=00210246 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000
  11. i tried with 'getResourceMapRootElement' and the debugscript says the resource isn't running so you're right. anyway, i 've found a solution so you can close this topic.
  12. it should be, because i'm checking it with the "isMap" function if exports.mapmanager:isMap(theMap) then mapRoot = getResourceRootElement(theMap) also i tried this function getObjectsInMap (mapname) theMap = getResourceFromName(mapname) --mapname is supposed to be a string with the folder name Name = getResourceName(theMap) outputChatBox("The resource name is "..Name) end and it works
  13. for example i have this code: function getObjectsInMap (mapname) theMap = getResourceFromName(mapname) --mapname is supposed to be a string with the folder name if exports.mapmanager:isMap(theMap) then mapRoot = getResourceRootElement(theMap) --this returns false objectsInMap = getElementsByType("object",mapRoot) --so this doesn't work end end i dont know why "getResourceRootElement" returns false (it does when the specified resource doesn't exist) when i previously checked if it's a map with the "isMap" function. it works fine if i get the resource element in another way, for example, insead of using "getResourceFromName", using "getRunningGamemodeMap". thanks in advance
  14. en la wiki dice eso pero a mi me funcionó también de la manera que yo dije, acabo de probarlo con esto: numero = 1234 outputChatBox("el numero es "..numero) number es un numero en lugar de un string y sin embargo el mensaje sale bien.
  15. devuelve un numero, pero los numeros tambien funcionan con outputChatBox, por ejemplo outputChatBox(1) es lo mismo que outputChatBox("1")
×
×
  • Create New...