-
06-18-2009, 07:12 PM #16
- Join Date
- Jan 2008
- Location
- Ontario, Canada
- Posts
- 737
Re: Arma 2 scripts
I was going to eventually look into something like this.
Again, another cue from PR, I would like to try out a modified BF2 squad system. I really like the fact that you make squads in-game, you will have a lot less cases of "Oh, I'm the leader? I just picked a random spot!" and similar things.
I was thinking you could create up to a certain number of Squads/Sections/Teams of various types too. So, say 4 rifle sections, 2 GPMG teams, 2 AT teams, 2 Mortar teams, 1 Platoon HQ, etc etc
Might work, might not.
-
06-19-2009, 03:49 AM #17
Re: Arma 2 scripts
Quick question:
I am trying to create a script to make mortars disposable using the attachTo command. What I have so far is something fairly simple and it looks like this:
attachmortar.sqs:
mortar1 attachTo [player,[0,0,0]];
deleteCollection mortar1;
Object_is_attached = true;
Using this, I can use the addAction command to call out the script. My question is: when I want to set the mortar down, is there a command that will restore the collection of the mortar?


IN GAME ARMA: |TG-Irr| Lq.Snake
-
06-19-2009, 03:26 PM #18
- Join Date
- Jan 2008
- Location
- Ontario, Canada
- Posts
- 737
Re: Arma 2 scripts
What is a "collection"? Never seen it used before ...
-
06-19-2009, 04:18 PM #19
Re: Arma 2 scripts
The command deleteCollection will make an object invisible. For example, I can attach an M119 to a C130 using the attachTo command and then set the direction of the gun but it would look a little weird having an M119 sticking out so I would use deleteCollection to make it so that players can't see it but it is still there.
In this case, it would look ridiculous having a mortar attached to a player while he/she is running around so I wanted to make it invisible but I can't make it appear again when setting down the mortar. Do you know any other better ways to pick up a static weapon?


IN GAME ARMA: |TG-Irr| Lq.Snake
-
06-19-2009, 04:46 PM #20
- Join Date
- Jan 2008
- Location
- Ontario, Canada
- Posts
- 737
Re: Arma 2 scripts
Ah, neat command!
Well, yeah, Bert and I have made a small script system for dragging objects around and loading them into vehicles (bert did most of it to be honest
). It is slightly un-intuitive in that if you try and "speed up" by jogging, you will simply drop the object, but this was the method we found to work without other side effects.
Bert made a demo mission with a bunch of the scripts (from this thread a lot of them) included, with the intent to test them in MP and get people to try and find loop holes and "strange" behaviour.
-
06-19-2009, 05:08 PM #21
- Join Date
- Aug 2008
- Location
- Paris/Berlin
- Posts
- 133
Re: Arma 2 scripts
nthamma: deleteCollection seems not advisable to use judging from the biki entry. Options are to either move the object into the C130 without having it stick out or moving it to a position no player will ever see (below the ground for example or way off the map).
I already found a weirdness in the cannon towing part: when using this on a dedicated server, the cannon will flip back and forth from the setDir command when moving with the truck, even though it works correctly in the "player is host" way. Other than that, I think most stuff is working.
To the command/squad thing: You probably should move away from determining leaders by their names but rather attach variables to them. Then it would be easy to allow the guy with the variable "isPltHQ" to change the leaders of the other squads or even edit the squads completely etc. The Plt HQ could even designate a successor (its 2IC or whomever) and when Plt HQ dies or disconnects, the successor would automatically get the variable in order to avoid noone being able to fulfill the HQ tasks.
I think it would be possible (and feasible) to use the scoreboard replacement for this, with special options for those players having certain variables, i.e. allowing the Plt HQ to designate a new leader for a squad, a squad leader could designate a 2IC and all the other tasks that might be sensible for forming teams.
By the way, I made a crosshair replacement which always indicates (in a subtle way) the "front" of the player. This allows to disable crosshairs but still have a "feeling" of where the gun points and also counters the argument of TrackIR users who need the crosshair to have an idea where the center of their body/movement is.
-
06-19-2009, 06:23 PM #22
- Join Date
- Jan 2008
- Location
- Ontario, Canada
- Posts
- 737
Re: Arma 2 scripts
Neat.
Get that demo mission made and host a server already
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)




Reply With Quote

Bookmarks