
rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 27, 2010 02:38 PM
Msg. 1 of 32
I need to make several device_machinery files for the map I'm working on but I have never been able to get them to work right in the past. First of all, what exactly do I do to link a device machine to a control to operate it? Second, there are a few devices that I would like to have working for my map, but I'm not sure how to set them up, if it's even possible:
1. A device that once activated will continuously fir projectile for a set amount of time.(I know how to make fire via effect file, but not continuously for a brief period and after being activated by a control panel)
2. I want rig a control to open three doors AND trigger an AI encounter to spawn and infinitely respawn.(DONE)
3. A device that once activated will spawn a weapon once and require time before it can be used again.
4.(Optional) A device that once activated will do a simple animation and then be unusable. Edited by rerout343 on Aug 30, 2010 at 04:17 PM
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 28, 2010 01:47 AM
Msg. 2 of 32
okay,
1. not sure how to do that i think you need a custom device control for that though.
2. this requires some knowledge in scripting so i would use these commands in the script:
respawning ai: i think it's (ai_set_respawn encountername true) to stop respawning replace true with false.
device control: (sleep_until (= (device_get_position devicename) [1 or 0])) leave the brackets out and the number depends on what the current position of the device is.
doors: (device_set_position devicename [1 or 0]) same thing with the device control
ai placing: (ai_place encountername) places the specified encounter.
3. weapon spawning: (object_create weaponname) im not sure how to specify time before the next activation though.
4. gamma may be able to help you with that one.
and for knowing the positions of the devices in sapien hit the "~" key and type in
device_get_position devicename and that will display numbers for the current position of the device.
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 29, 2010 02:40 AM
Msg. 3 of 32
OK. I'll try that when I get the chance, but right now I'm having trouble just getting the doors to open when I activate the control panel.
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 29, 2010 12:09 PM
Msg. 4 of 32
i think you may have to create a unicode string list for custom object names for this to work properly, download this to create string lists. http://hce.halomaps.org/index.cfm?fid=1049and then place the string list in the custom object names area in the bottom of the scenario tag in guerilla. Edited by d4rfnader on Aug 29, 2010 at 12:10 PM
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 29, 2010 01:30 PM
Msg. 5 of 32
I did that but it still doesn't let me activate the control.
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 29, 2010 02:23 PM
Msg. 6 of 32
are you using cmt's covenant radio control or the one from b30?
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 29, 2010 02:37 PM
Msg. 7 of 32
holo control from b30
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 29, 2010 03:56 PM
Msg. 8 of 32
download cmt's a30v2 map and extract the cmt folder with the hek+ i've found that the b30 devices don't really work lol.
EDIT: in the cmt\devices\covie_radio folder is where the device is i think. Edited by d4rfnader on Aug 29, 2010 at 03:57 PM
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 29, 2010 04:49 PM
Msg. 9 of 32
Could I use the covie radio tags from the built-in a30 instead? I don't like using other people's tags. Edited by rerout343 on Aug 29, 2010 at 04:50 PM
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 29, 2010 04:59 PM
Msg. 10 of 32
maybe, CMT released their latest maps unprotected for everyone to use their tags so everyone has permission you just have to give them credit.
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 29, 2010 05:01 PM
Msg. 11 of 32
Permission or not, I just try to go by my standard of, If I can't make it my self, I won't use it.
Edit: I just tried the tags from a50 but it still doesn't work. Do I need a script or what else could I be doing wrong? Edited by rerout343 on Aug 29, 2010 at 05:28 PM
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 29, 2010 07:05 PM
Msg. 12 of 32
here's what the script should look like if the door's name is door1 and the control's name is control1:
(script startup door-open (sleep_until (= (device_get_position control1) 1) (device_set_position door1 1) )
*this is assuming that the device_control's position is 0 and the door's position is 0
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 29, 2010 11:06 PM
Msg. 13 of 32
For some reason my doors start open but then close a few seconds later and cannot be re-opened by the switch. Also, for some reason it will give the option to press the switch while the doors are open, however once they close on there own I can't press it anymore.
EDIT: Nevermind, I fixed it 30seconds after posting. But I still need to figure out the other issues. Edited by rerout343 on Aug 29, 2010 at 11:21 PM
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 29, 2010 11:16 PM
Msg. 14 of 32
in sapien type device_get_position [name of device] without the brackets for each device and post the number next to the type of device here.
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 30, 2010 12:33 AM
Msg. 15 of 32
Now the door works perfectly, but now I need the script to spawn my encounter as well as open the door, but right now it's not working.
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 30, 2010 12:42 AM
Msg. 16 of 32
ok, make sure that not initially created flag is checked, and after the device_set_position part of the script add (ai_place encountername)
*replace encountername with the name of encounter lol
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 30, 2010 12:51 AM
Msg. 17 of 32
I did but it they still didn't spawn.
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 30, 2010 01:23 AM
Msg. 18 of 32
hmmm.... you want it to look like this and it should work,
(script startup door-ai (sleep_until (= (device_get_position control1) 1) (device_set_position door1 1) (ai_place encounter1) )
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 30, 2010 02:03 AM
Msg. 19 of 32
This is the script I'm using right now but it's still not working
(script startup game_start (sleep_until (= (device_get_position control1) 1)) (device_set_position door1 1.0) (device_set_position door2 1.0) (ai_place encounter1) )
EDIT: Nevermind, I fixed it. For some reason switching the control back to the one from b30 fixed it. Edited by rerout343 on Aug 30, 2010 at 03:00 AM
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 30, 2010 02:33 PM
Msg. 20 of 32
ok cool sorry i wasn't all that helpful lol.
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 30, 2010 04:16 PM
Msg. 21 of 32
That's ok, actually your script helped a lot and probably saved me a couple hours work. Although now I need to figure out the other ones I mentioned in my original post.
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 30, 2010 04:22 PM
Msg. 22 of 32
the spawning a weapon part for that one device is easy i'm just trying to figure out how to have a time limit before it can be used again.
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 31, 2010 02:50 AM
Msg. 23 of 32
I managed to get a device to fire a projectile when I press the control but it only fires once and then needs to be pressed again. I need it to fire constantly when I press the switch, and so far I haven't been able to figure out the problem.
|
|
|

CJrocks17
Joined: Aug 31, 2010
|
Posted: Aug 31, 2010 11:25 AM
Msg. 24 of 32
Repeat the script multiple times and delay each one a little more. I don't know of a script that does that without repeating. (I am new to scripts).
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 31, 2010 02:01 PM
Msg. 25 of 32
The only problem is that won't be a practical way to do it because I would have to repeat the script 300 times to fire for 30 seconds.
|
|
|

SlappyThePirate
Joined: Aug 24, 2009
You are irritating, I'll release nothing
|
Posted: Aug 31, 2010 03:02 PM
Msg. 26 of 32
Quote: --- Original message by: rerout343 The only problem is that won't be a practical way to do it because I would have to repeat the script 300 times to fire for 30 seconds. global short NUMBER 0 global boolean GONAO script continuous gogogogo ___if GONAO is true: ______if NUMBER is less than 300: __________begin _____________(firing sequence for one shot) _____________pause for the number of ticks between shots ______if NUMBER is 300 __________begin _____________set NUMBER 0 _____________set GONAO false end script So to make it go, you set GONAO to be true. It's hard becuase there's no loops in HSC code. Edited by SlappyThePirate on Aug 31, 2010 at 03:03 PM
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 31, 2010 03:56 PM
Msg. 27 of 32
Actually I'm not firing the projectile via script, I'm firing it via effect file attached to my device.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Aug 31, 2010 05:01 PM
Msg. 28 of 32
Quote: --- Original message by: SlappyThePirate It's hard becuase there's no loops in HSC code.
No recursion either :[
|
|
|

d4rfnader
Joined: Jul 16, 2010
Open mouth, insert sandwhich.
|
Posted: Aug 31, 2010 05:25 PM
Msg. 29 of 32
if there's some sort of weapon attached to your device maybe set it to discharge? this is what the battle rifle does.
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 31, 2010 05:34 PM
Msg. 30 of 32
Can a device_machine file even have a weapon? I was making it fire via effect file.
I managed to do a work-around by firing a stationary projectile that repeatedly fires my projectile until the timer expires. Now I need to find a way to set it up so you cannot activate it again for a set amount of time. Edited by rerout343 on Aug 31, 2010 at 07:00 PM
|
|
|

SlappyThePirate
Joined: Aug 24, 2009
You are irritating, I'll release nothing
|
Posted: Aug 31, 2010 07:49 PM
Msg. 31 of 32
global short NUMBER 0 global boolean GONAO
script continuous gogogogo ___if GONAO is true: ______if NUMBER is less than 300: __________begin _____________(firing sequence for one shot) _____________pause for the number of ticks between shots ______if NUMBER is 300 __________begin _____________set NUMBER 0 _____________set GONAO false _____________sleep for the amount of time in between uses end script
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Aug 31, 2010 09:47 PM
Msg. 32 of 32
The sleep command didn't work.
|
|
|