Jump to content

Puma

Members
  • Posts

    240
  • Joined

  • Last visited

Everything posted by Puma

  1. All my good MTA maps are downloadable at GTAGarage! Link: http://www.gtagarage.com/mods/show.php?id=11149
  2. Because he is an attention whore.
  3. Could be, but I definantly have not stolen the idea. I just saw that "Tilt" map from someone on this forum and that inspired me to make this. Maybe the goal is the same: don't fall off, but that's the main goal in all DD maps, isn't it? I furtherly improved the whole idea of (an) object(s) moving/rotating and added a custom object and some sounds..
  4. Where have you seen it before then? Can't imagine that that's possible, because I made the model just a few days before I uploaded the video ...
  5. Can't fix that, because the cube is moving with a certain "FPS": it doesn't move smoothly from A to F, but it goes via A, B, C, D, E, F. It's like a film that has multiple frames which are played fast after eachother: because of the short period between the frames it looks smooth. Because the cube moves from A to B to C, you will not move with the cube, but the cube will move 'through' you: the cube is created at position A, destroyed, recreated at position B, destroyed, recreated at position C etcetera. As for the falling into the cube: that's caused by what I described above, because the cube slowly emerges you into the model and, if the distance between two points isn't too big, it'll push the vehicle a bit because the force on it suddenly increases, if you get what I mean. When the distance between too points is too big, the vehicle will slowly be 'eaten' by the model. Correct me if I'm wrong though, but this is the only explanation I could think of and I think the "FPS" is quite visible ingame too if you look at a 'moving' object.
  6. You're talking about it like making good maps and scripts is just some daily business. It's not. There's a lot of people out there that produce maps faster than McDonald's can bake hamburgers, but that doesn't say the stuff they produce is good. I can say that the stuff I produce is quite good and original and that's only because I only show and/or release what I think is good enough (being a perfectionist helps too ). Making good maps isn't that simple and you won't be able to fill your server with cool maps that use scripts and custom models etcetera, because, like DarkDragon already said, there are only a few people who are able to "successfully put mapping and scripting skills into one awesome piece of work" and I'm just very lucky to have the imagination to think of something new that people like. I'm not boasting here, I just want to tell you that you need to have some talent and idea of what you're doing. I've been doing modding and modeling for years now and I have played GTA even longer than that (started with MTA:VC when I was a newbie of 11 years old or so), and I still learn from every new map, model, mod or script that I make (not that I'm that good at scripting yet ). You need years of experience to know what people like and what people don't like and how to fulfil their expectations. It's not like snapping with your fingers and you got a sandwich on your plate, to say it like that. You gotta know what ingredients to use, in the right proportions, how to cook and how to serve them, while you're still doing your own thing. Again, I'm not boasting, I just want you to know that it's not as easy as you think.
  7. Haha I'll upload the maps somewhere very soon, maybe even tomorrow.
  8. Map for the race gamemode, based on a moving cube on which you are meant to stay until you're the only surviver. How simple can it be ? The movements of the cube are random. Script and model both by me.
  9. Hm, ok, thanks, I get what you mean, gonna try it. Thanks!
  10. Hi, I know this has been asked several times already, but I just haven't found what I'm looking for. I want to script a command which will result in a sound being played for everyone. Now, I've searched quite a lot and I found some topics about the radiostation-script, but that wasn't what I needed: I just want something that manipulates the "playSound"-clientside-function so that the sound is played to all players at the same time. Is it even possible to script it?
  11. Ok, so I'm using exactly the same username and password as on this forum but it keeps saying that the password is incorrect, like wtf?
  12. Ok and how the heck would you suggest getting this on the wiki ?
  13. -------------------------------------------------------------------------------------------- Creating moving objects in MTA:DM -------------------------------------------------------------------------------------------- Ok, so I promised a few people how to create moving objects in maps for MTA DM, race gamemode. This tutorial might seem a bit long, but that is because everything is explained very detailed an not because of the toughness of it. First of all, if you don't know what I'm talking about: I've made a few maps and they're like by a lot of people, because of the exclusivity. I add scripts to the map, which contain things like gun-pickups and, in this case, movable objects. The movie about my last and, in my opinion, best map I made, you can see what I mean with "movable objects". YouTube: This tutorial is an example of the scripting that causes the first three blocks to move up and down in the video at 0.21. Ok, so how do I do that? -------------------------------------------------------------------------------------------- 1. PREPARATIONS First, you must have a MTA-DM map. Go to the folder of that map (mostly "C:\Program Files\MTA San Andreas\server\mods\deathmatch\resources", you'll find a folder or a .zip-file here named with the name of your map). If it is a .zip-file, you must unpack it first. After that, delete the original .zip file so only a new folder remains with the name of the map and a few files in it. MTA can read both folders and .zip-files as a map, but if you got both a .zip-file ánd a folder that contains the same map, MTA won't see any difference and use them as two seperate maps. NOTE: Make a copy of the map and put it somewhere safe, so you got a backup if anything goes wrong. We start by creating a .lua-script in the map-folder. In this whole tutorial, I'm using Notepad as editor for the script. Start up the programme (Notepad), and save the empty file in the map-folder (menu: File -> Save as). When you do this, choose "All files" in the "Save as type" box, below the box where you fill in the file name. Then, name the file "yourname.lua" (the name must not include spaces). The ".lua" at the end is VERY important. By selecting "All files" in the "Save as type" box, Notepad allows you to choose a filetype yourself, which you can assign to the file by typing the extension right after the name. Save the file. If you now hover over the file in the folder, it should say "LUA-file". If it doesn't, try again. The next step is to tell the map that it must use the script. First, you must know that the folder or the .zip-file that contains the map, always contains two files: the "yourname.map" file, which is the map, and another file called "meta.xml". When MTA reads the map, it first reads "meta.xml", because that's the file that contains valuable information about the map: where can I find the scripts, the map itself, who is the author and even what weather the map uses, if you choose to define that in "meta.xml". -------------------------------------------------------------------------------------------- 2. META.XML Okay, so we need to define the script in "meta.xml". Use Notepad to open the file. The file will contain a few things. First, on top and at the end it should contain a (the start) and a (the end) tag. Between these tags, several paths and information are defined (like in html). You'll probably see a "" tag, which defines where the .map-file can be found. The path to the .map file starts in the folder where "meta.xml" is found. "meta.xml" must always be directly in the map folder, otherwise MTA won't recognize the map. Somewhere between the tags, you must create a line that defines the path to the .lua-script. If your script has tags, do not put it between these tags! You can copy-paste this line: <script src="yourname.lua" type="server" /> Don't forget to change some things! First, you must change the name ("yourname.lua") to the name of your script (quite obvious). The second thing that is important to know, is the "type" bit. MTA uses two different sorts of scripts: client-side scripts and server-side scripts. Client-side scripts are scripts that are downloaded to the user's PC and can differ at actions per person in the server. For example, client-side scripts are usded to change models ingame, but also the syntax of some functions can differ depending on the script-type. Server-side scripts are scripts that perform actions which affect everyone in the server, such as explosions and objects that are created by scripts. Our scripts must be server-side, because the objects must threat all players equal at the same time, so there's no player left behind in actions. The type is "server". Save meta.xml and open the .lua-script you made earlier. -------------------------------------------------------------------------------------------- 3. THE SCRIPT: CREATING A FUNCTION, ADDING EVENTHANDLERS AND CREATING OBJECTS I want this tutorial to be clear too for people that are new to .lua-scripting, so I'll explain everything. First, we must tell the script what to do when the map is started. I'll first explain how a .lua-script works. Almost every script-language works with functions. A function contains actions and tells the game what to do when something happens. Every function looks like this: function resource_starts () end Syntax (= what all parts mean): - "function"": Tells the game that this is a new function - "resource_says_hai": The name of the function. A script can not contain multiple functions with the same name. The name must contain spaces ("blabla" is correct, "bla bla" is incorrect). The fact that I used "resource_starts" as name does not have anything to do with the function of the function (if you get what I mean). For example, I can call the function that is executed when the script starts "whazaaahhhhdupdupilikebeeer", because only the name itself is important, not the meaning of the words it contains. - "()": Between these brackets, you can type names that refer to things in the game, such as the player or a vehicle. - "end": This is the end of the function. The amount of "ends" must always be equal to the amount of functions, otherwise the script will crash. Ok, fun, we've got a function now. But erm.. If there is like ten functions in one script, how does MTA know what function to run when something happens? That's not hard to explain. MTA uses "eventhandlers" to link certain events (for example sitting in a car), causes (the person that's sitting in the car) and effects (what happens if that person get's in a car = the function). There is a lot of different eventhandlers. In for this function, I'll use the eventhandler for starting the script: addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) Eventhandlers must be OUTSIDE other functions. The best way to avoid eventhandlers being included in functions, is to simply put all eventhandlers at the top of your script. Syntax: - "addEventHandler": The name of the function (you can't CAN NOT change that name). After the name of the function, the brackets come with the information that is neede for the function between it: - ""onresourcestart"": The name of the event (you can find more events here: https://wiki.multitheftauto.com/wiki/Scripting_Events ) - "getRootElement()": Don't ask my how or why, but this means "all players in the game". You can also put a name here, so only this player will be affected on what happens by this eventhandler. - "resource_starts": What function should be executed when the event (starting the resource) is caused by what element ("getRootElement()" in this case = everyone). So, now we've scripted that our function "resource_starts" will be started when the resource is started! Let's start scripting what happens when the function "resource_starts" is executed. In this tutorial I will use three objects to explain how it works. First, we create three objects by script: addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function resource_starts () createObject ( 17950, 4520.808105, -1569.693359, 34.411907 ) createObject ( 17950, 4513.611816, -1569.802612, 46.449081 ) createObject ( 17950, 4506.434570, -1569.778076, 34.411907 ) end Syntax (I'm talking about the "createObject" stuff now): createObject ( model-ID, X-coördinate, Y-coördinate, Z-coördinate, X-rotation, Y-rotation, Z-rotation ) If you don't use rotations at all (as in my case), you can simply leave them out of the function. You can not leave the coördinates out of it. NOTE: If you do want a Z-rotation, but not a X- and Y-rotation, you DO HAVE to include the X- and Y-rotation otherwise the script will interpretate the Z-rotation as the X-rotation. Read more about createObject here: https://wiki.multitheftauto.com/wiki/CreateObject We have to define those objects, so we can refer to them later in this tutorial. Do this by simply putting "name =" in front of everything: addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function resource_starts () object1 = createObject ( 17950, 4520.808105, -1569.693359, 34.411907 ) object2 = createObject ( 17950, 4513.611816, -1569.802612, 46.449081 ) object3 = createObject ( 17950, 4506.434570, -1569.778076, 34.411907 ) end All names that are given to the objects must be different. Now we've created the objects, we must get them to move. -------------------------------------------------------------------------------------------- 4. THE SCRIPT: CREATING A FUNCTION, ADDING EVENTHANDLERS AND CREATING OBJECTS You don't always need an eventhandler to execute a function. You can also just execute the function by putting the name of the function inside another function. I'm using that method in this tutorial because that makes the script a lot clearer: addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function resource_starts () object1 = createObject ( 17950, 4520.808105, -1569.693359, 34.411907 ) object2 = createObject ( 17950, 4513.611816, -1569.802612, 46.449081 ) object3 = createObject ( 17950, 4506.434570, -1569.778076, 34.411907 ) move1_1 () end Now, after the three objects are created, the script will jump to a function called "move1_1". We'll create that function now: addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function resource_starts () object1 = createObject ( 17950, 4520.808105, -1569.693359, 34.411907 ) object2 = createObject ( 17950, 4513.611816, -1569.802612, 46.449081 ) object3 = createObject ( 17950, 4506.434570, -1569.778076, 34.411907 ) move1_1 () end function move1_1 () end Let's fill it in. We need a function that makes the objects move: moveObject. With the "moveObject" function, you can make a specific object that is created in the same script (very important) move to a specific coördinate in a specific time. It will look like this: addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function resource_starts () object1 = createObject ( 17950, 4520.808105, -1569.693359, 34.411907 ) object2 = createObject ( 17950, 4513.611816, -1569.802612, 46.449081 ) object3 = createObject ( 17950, 4506.434570, -1569.778076, 34.411907 ) move1_1 () end function move1_1 () moveObject ( object1, 4500, 4520.808105, -1569.693359, 46.449081 ) moveObject ( object2, 4500, 4513.611816, -1569.802612, 34.411907 ) moveObject ( object3, 4500, 4506.434570, -1569.778076, 46.449081 ) end Syntax of moveObject: moveObject ( name_of_the_object, moving_time, new_x-coördinate, new_y-coördinate, new_z-coördinate, new_x-rotation, new_y-rotation, new_z-rotation ) Again, you can leave the new rotation values out of the function if you want, just like I did. Important to know is that time in scripts is ALWAYS given in milliseconds (1 second is 1000 milliseconds)! What I've scripted: The object called "object1" will be moved in 4500 milliseconds = 4,5 second to X=4520.808105, Y=-1569.693359 and Z=46.449081. The speed depends on the distance between the new and old coördinates. You might need to test it a few times and adjust the speed by changing the times. Read more about moveObject here: https://wiki.multitheftauto.com/wiki/MoveObject Now comes a very important part of the script. After the objects have reached their new destinations, we want them to return to their first position. How do we do that? Simple. We use a timer: addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function resource_starts () object1 = createObject ( 17950, 4520.808105, -1569.693359, 34.411907 ) object2 = createObject ( 17950, 4513.611816, -1569.802612, 46.449081 ) object3 = createObject ( 17950, 4506.434570, -1569.778076, 34.411907 ) move1_1 () end function move1_1 () moveObject ( object1, 4500, 4520.808105, -1569.693359, 46.449081 ) moveObject ( object2, 4500, 4513.611816, -1569.802612, 34.411907 ) moveObject ( object3, 4500, 4506.434570, -1569.778076, 46.449081 ) setTimer ( move1_2, 4500, 1 ) end Syntax: setTimer ( function_that_is_executed_after_epilapsed_time, time, times_to_execute ) In this case, the function called " "move 1_2" will be executed 4,5 seconds after the timer has started, which is 4,5 seconds after the objects have began to move, which is the moment that they arrive at their new destination! If you want the objects to stand still for a moment, you just increase the time in the setTimer-function so that it's more than the time in the moveObject-function. Read more about "setTimer" here: https://wiki.multitheftauto.com/wiki/SetTimer Next function is the "move1_2" function which is basically the same function as "move1_1" but with other coördinates and a new timer that refers to "move1_1": addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function resource_starts () object1 = createObject ( 17950, 4520.808105, -1569.693359, 34.411907 ) object2 = createObject ( 17950, 4513.611816, -1569.802612, 46.449081 ) object3 = createObject ( 17950, 4506.434570, -1569.778076, 34.411907 ) move1_1 () end function move1_1 () moveObject ( object1, 4500, 4520.808105, -1569.693359, 46.449081 ) moveObject ( object2, 4500, 4513.611816, -1569.802612, 34.411907 ) moveObject ( object3, 4500, 4506.434570, -1569.778076, 46.449081 ) setTimer ( move1_2, 4500, 1 ) end function move1_2 () moveObject ( object1, 4500, 4520.808105, -1569.693359, 34.411907 ) moveObject ( object2, 4500, 4513.611816, -1569.802612, 46.449081 ) moveObject ( object3, 4500, 4506.434570, -1569.778076, 34.411907 ) setTimer ( move1_1, 4500, 1 ) end Save it and you're done: go test it! What the script does in very short terms: 1. When the script starts, a few objects are created and after that the function called "move1_1" is executed. 2. In "move1_1" the objects are moved to a new position and at exactly the same time that the objects reach their new position, "move1_2" is executed. 3. Function "move1_2" moves the object back to their original position and at exactly the same time that the objects reach their new (= old) position, "move1_1" is executed and the proces (2 and 3) is started over again. 4. This continues forever, until the resource is stopped and the next resource is started. -------------------------------------------------------------------------------------------- Hope you learned something today, a comment would be nice! Have fun with the tutorial. by Puma http://www.pumastudios.nl http://www.youtube.com/StijnLinderman
  14. Puma

    Puma's MTA Maps

    Checkpoints? It is a DM map..
  15. Puma

    Puma's MTA Maps

    New map: "Just get the fucking Hunter" Click the link for video.
  16. Hi, I was wondering if there were any more people using scripts in race-maps? I found out that a whole new gameplay can be created. For example, I made a script that gives you a random weapon when you drive through a marker (you must create some markers in the same script, d'oh) and a map with moving parts (I'm not releasing the scripts). Perfect for DD/DM maps! If you guys aren't using scripts yet, don't hestitate, just do it! Here's some of my outcomes:
  17. Puma

    Puma's MTA Maps

    Update, three new DD/DM maps. I'm using more and more script in combination with race-maps.
  18. Puma

    Puma's MTA Maps

    New pickups, mkay?
  19. Can we expect support for it in the next version?
  20. Hi, Today I changed the model of an original SA billboard into one with a texture animation (UV animation) on it. It works fine in single player, but when I replace the txd and dff of the model with a LUA script and I spawn a few of the billboards as objects, the animation doesn't work. The bord is displayed, the textures work but the animation of the textures doesn't work. Video of the animation (it was a bit fast but I fixed that): You see it works in single player. It doesn't in multiplayer. Wut?
  21. Puma

    Puma's MTA Maps

    Me and some other guys are cooperating on a server right now. The server is online, but has a password on it. When we've finished an amount of maps that we think is quite alright (20 - 30), the server will be open one evening, so people can check it out and preview the whole thing. The name is "Maximum Ketchup". Mark (one of the other guys) works with 3dsMax and 3dsMax is a general programme in gta modding. SketchUp is a programme that I work with. 3dsMax > Maximum, SketchUp > Ketchup. I made some thingies according to the name already. I changed the logo that is displayed when you enter the server, made a new model for the nitro-pickups and more. To do is changing the nitro bottles that appear on the cars for example. Few screens (click for enlargement):
  22. Nice one! New model for a plane plus crawl-animation, I guess. Good idea, good result.
  23. No, it's not. Look at the server list: there's quite an amount of servers that is running the race gamemode . Nice maps by the way, SiK is a good server with great maps. Haven't seen a better server so far.
  24. Puma

    Puma's MTA Maps

    I didn't say it was easy .
×
×
  • Create New...