Spawning [moving] objects, MP script |
Spawning [moving] objects, MP script |
May 3 2009, 20:21
Post
#1
|
|
N00b always & everywhere Group: Members Posts: 430 Joined: 30-October 07 From: Wodzisław Śl. - Poland Member No.: 1,589 |
OK, that's a thing Im gonna do:
1. This MP situation. There are to bases (OPFOR and BLUEFOR). In each base there is repair truck. 2. On small island far far away are 2 ammo crates and 1 AT pod, 1 AA pod and 2 MG Nests (for each side). 3. Now, the truck is moving to any location 4. When on place, driver can: - put one of ammo truck - put second one - put one of MG Nests - put second one - put AT Pod - put AA Pod Every object is teleported from that island to new location 5. Any object is placed behind the truck at dir around 180* . I mean eg. MG Nest is situated directly opposite to the truck. 6. Now you cannot move any of those objects for 1 minute or more (depends whats that). Then you can move them to other location (of course when you drive with truck to other place). 7. Any Object cannot be destroyed. And now - who can make it? Its probably not so hard to do, but I really dont have idea how to make it compatible with MP and/or ACE. Who can help me? |
|
|
May 4 2009, 16:05
Post
#2
|
|
Junior Member Group: Members Posts: 24 Joined: 1-February 08 From: Denmark Member No.: 2,272 |
OK, that's a thing Im gonna do: 1. This MP situation. There are to bases (OPFOR and BLUEFOR). In each base there is repair truck. 2. On small island far far away are 2 ammo crates and 1 AT pod, 1 AA pod and 2 MG Nests (for each side). 3. Now, the truck is moving to any location 4. When on place, driver can: - put one of ammo truck - put second one - put one of MG Nests - put second one - put AT Pod - put AA Pod Every object is teleported from that island to new location 5. Any object is placed behind the truck at dir around 180* . I mean eg. MG Nest is situated directly opposite to the truck. 6. Now you cannot move any of those objects for 1 minute or more (depends whats that). Then you can move them to other location (of course when you drive with truck to other place). 7. Any Object cannot be destroyed. And now - who can make it? Its probably not so hard to do, but I really dont have idea how to make it compatible with MP and/or ACE. Who can help me? I would recomend you to try at www.ofpec.com |
|
|
May 5 2009, 05:18
Post
#3
|
|
Group: Addon Maker Posts: 1,148 Joined: 4-November 06 Member No.: 13 |
I would recomend you to try at www.ofpec.com You might aswell answer any mission editing questions on these boards the same way... There's a reason why these forums have a mission editing board too. Anyway, SaS TrooP, what exactly do you need help with? What can you manage yourself and what you don't know how to do? Objects could be put in position with addAction command which would then setPos the certain objects in there. Remember to use removeAction in the scripts to remove each of the actions after they've been performed once. You can set the objects' direction oppositing the truck like this: CODE object setDir (getDir truck) +180 It will return the direction of the truck and will add additional 180 degrees into that number. That's how it works. I don't understand how exactly would you want the 6. work, but I will assume you'd want the objects to be able to be removed after 60 seconds of placing and then, after removal, the player will get the action put that same object in place again. Simply put a 60 second timer in the scripts which setPos'es the objects at the back of the truck, after which you should give the object an action to be setPos'd back on the small island far away. At the end of that "removal" script, give the player the action again to put the object at the back of the truck. To make objects invincible: CODE object addEventHandler ["hit", "object setDammage 0"] Not 100% guaranteed if works - Sometimes the objects may get a lethal hit which will destroy them completely and the eventHandler will not work. You could use eventHandler "killed" too, but I have experienced some funny things with it too - Some players see the objects destroyed regardless of the event handler, some players see it intact. It's funny to look at players driving around in a destroyed car... |
|
|
May 5 2009, 15:39
Post
#4
|
|
N00b always & everywhere Group: Members Posts: 430 Joined: 30-October 07 From: Wodzisław Śl. - Poland Member No.: 1,589 |
Well, I know the complex of what is needed to be used - but I dont know how to put it together as a working script. And I am not MP specialist and I am not good in writing dialogs.
And - finally - option gotta be blocked for other side. |
|
|
May 6 2009, 09:15
Post
#5
|
|
Group: Addon Maker Posts: 1,148 Joined: 4-November 06 Member No.: 13 |
Well, I can't make dialogs either. Simple actions might be the easiest solution... If you'd take a look at the BI Wiki pages I linked above, you might be able to learn and do it yourself. It's hard to give direct answers because I don't know what exactly you have in mind.
To block the actions for either of the sides, use the side command to check their side. Supposing you have a script or a trigger with all the actions given in there which would get activated once the truck is in position, put this at the start of the script / at the condition of the trigger along with the line that checks whether the truck is in position: CODE ?!(side player == west): exit That will block the actions if the players are not in West/BLUFOR side. Also, have a look at this page: http://community.bistudio.com/wiki/Multiplayer_scripting It has some very useful info you should take into account when making multiplayer missions. Only some weeks ago I wasn't a multiplayer mission editing specialist either. In fact, I didn't know anything what to take into account. But after reading that page, it's all clear to me now. This post has been edited by Rellikki: May 6 2009, 09:19 |
|
|
Lo-Fi Version | Time is now: 26th April 2024 - 12:20 |