nedal 0 Posted September 13, 2002 I had this idea to make a sort of different respawn protection for mp maps. as soon someone enters the enemy respawn zone, the enemy gets a empty M113 for free at respawn point i tried to make this with a trigger: class Sensors {items=1;class Item0 { position[]={10731.301758,127.943672,2808.072266}; a=400.000000; b=200.000000; rectangular=1; activationBy="WEST"; age="UNKNOWN"; text="punishementwest"; expActiv="hint ""respawnpunishement""; Panzerwest = ""M113"" camcreate[10793.035156,128.075027,2842.903809]"; class Effects { }; synchronizations[]={}; }; }; but id does not work, there is no M113 comming! this M113 should also be empy, means side = empty and unlocked could someone help please? Share this post Link to post Share on other sites
bn880 5 Posted September 13, 2002 camCreate? hmm, I believe you should use createVehicle. EDIT: have not tried NPD yet.. will do NOW Share this post Link to post Share on other sites
GAMEER_77 0 Posted September 13, 2002 First off...why the big .sqm? ANyways your Q: use createvehicle not camcreate. (damn Bn880 you beat me to it! ) nameofvehicle createVehicle [x,y,z] P.S have you tried NPD yet Bn880? PEACE Share this post Link to post Share on other sites
nedal 0 Posted September 14, 2002 I have tried also: position[]={10731.301758,127.943672,2808.072266}; a=400.000000; b=200.000000; rectangular=1; activationBy="ANY"; repeating=1; timeoutMin=1.000000; timeoutMid=1.000000; timeoutMax=1.000000; age="UNKNOWN"; expActiv="Panzerwest = M113 createVehicle [10805.835938,127.856537,2862.103271]"; class Effects { }; synchronizations[]={}; but also this version did not work you ask me why the big sqm? you think it would be betteras a sript.sqs? but even for a sript you need a trigger, so i thault it would be better to just add it in the init field of a trigger i dont know furter, pls help......... Share this post Link to post Share on other sites
bn880 5 Posted September 14, 2002 2--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (nedal @ Sep. 13 2002,222)</td></tr><tr><td id="QUOTE">expActiv="Panzerwest = M113 createVehicle [10805.835938,127.856537,2862.103271]";<span id='postcolor'> should be </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">expActiv="Panzerwest = ""M113"" createVehicle [10805.835938,127.856537,2862.103271]";<span id='postcolor'> and that's if M113 is the proper name... does your trigger actually activate? Share this post Link to post Share on other sites
nedal 0 Posted September 14, 2002 i tried also this bevore expActiv="Panzerwest = "M113" createVehicle [10805.835938,127.856537,2862.103271]"; but it did not work...... hmmm it seems i never get this working Share this post Link to post Share on other sites
GAMEER_77 0 Posted September 14, 2002 Are you coding this from the mission.sqm? It should work if you just put: M113 createvehicle [10805.835938,127.856537,2862.103271] Whether or not thats what the M113 is i don't know. PEACE Share this post Link to post Share on other sites
nedal 0 Posted September 14, 2002 yes, as i said, i put a trigger in the mission.sqm (in editor) made a hint in the trigger, to see if the trigger is correctly activatet, and it is, so i changed the hint (on activation field) to the creat vehicle command. first i put a fire on the map, and copied the coordinates from the fire for the coordinates for the create vehicle command. and this is the result in the mission.sqm expActiv="Panzerwest = ""M113"" createVehicle [10805.835938,127.856537,2862.103271]"; but it just does not work! the m113 is correct! ( i put a m113 on the map, and checked, M113 is the code for M113! try it for our self if you want....:) is there no example mission where the create vehicle command is used in a trigger? Share this post Link to post Share on other sites
bn880 5 Posted September 14, 2002 that is veeery strange, try without the 127.xxxx, just X,Y value to vehicleCreate. btw, you should always use "M113" in editor and ""M113"" in .sqm putting in M113 will not work ever. Share this post Link to post Share on other sites
bn880 5 Posted September 14, 2002 what I would do is Panzer = "M113" createVehicle getPos this; which will create the vehicle at the trigger... just to check your createVehicle command. Share this post Link to post Share on other sites
nedal 0 Posted September 14, 2002 thanks for the advise, just tryed it, but even this did not work! soon i go nuts smile Share this post Link to post Share on other sites
bn880 5 Posted September 14, 2002 I have just tried it... Panzer = "M113" createVehicle getPos abra; abra is what I named the trigger created an M113 Share this post Link to post Share on other sites
Shabadu 0 Posted September 14, 2002 That's a point. Nedal, did u make sure that your co-ordinates are correct? Usually easier to use getpos. Share this post Link to post Share on other sites
nedal 0 Posted September 14, 2002 i tried it again and named the trigger tankwest and with getPos tankwest it did work!!!!!!juheeeee so it seems the coordinates where wrong! but if i plase a fire, and copy the coordinates, shouldnt those coordinates be ok? but anyway, i thiunk i can make my idiea also without coordinates thanks to all Oberst Nedal Share this post Link to post Share on other sites
ColdShine 0 Posted September 15, 2002 You can use the method you've said, but I think you have to use [the 1st value (X), the 3rd (Y), and an height@ground (Z) value you wish (probably 0)]. This always works with setPos, so I think it will be the same with createVehicle. Share this post Link to post Share on other sites
Rexxenexx 0 Posted September 15, 2002 Try this: 1 ) Create a new mission w/ one player (you) 2 ) Create a GameLogic name it GLm113 3 ) Create a Trigger, in the On Activation write Shazbot = "M113" createVehicle getPos GLm113 4 ) Done! Test it by walking into trigger w/ your player. Put the GameLogic anywhere you want the M113 to spawn. GoodLuck Dude!! Share this post Link to post Share on other sites
bn880 5 Posted September 15, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (ColdShine @ Sep. 14 2002,22:09)</td></tr><tr><td id="QUOTE">You can use the method you've said, but I think you have to use [the 1st value (X), the 3rd (Y), and an height@ground (Z) value you wish (probably 0)]. This always works with setPos, so I think it will be the same with createVehicle.<span id='postcolor'> Yes! I just thought of that last night. The .sqm has it's Y and Z values reversed. That was the whole problem. Share this post Link to post Share on other sites
nedal 0 Posted September 17, 2002 I got it working, but now i have the problem that actually not just one M113 appears, but randomly a few M113. Trigger: position[]={10824.690430,128.649277,3346.457031}; a=240.000000; b=100.000000; rectangular=1; activationBy="WEST"; age="UNKNOWN"; text="4warn=tankgift"; name="Easttank"; expActiv="Panzerost = ""M113"" createVehicle getPos Easttank; hint ""East got a tank as gift because west made respawn rape"""; hm i dont know why! it should be just one m113 for each Respan Rape Share this post Link to post Share on other sites
nedal 0 Posted September 20, 2002 i tryed to fix the multyspawn problem, but it did not work 1. i createt a GameLogic and named it Server. 2. i createt a GameLogic name it GLem113 3. i made a trigger and in the init field i have: [this]exec "tank.sqs" 4. i made a script: tank.sqs ?!(local Server): Goto "end" titletext ["East got a tank as gift because West made respawn rape","plain"] Panzerwest = "M113" createVehicle getPos GLem113; #end Exit and it is stil not running!? I think i need help some one must have done soething like this, id should not be so difficult, just if someone runns in a trigger, a tankgift appears on a spezial point! please, i need help Share this post Link to post Share on other sites
nedal 0 Posted September 24, 2002 hmm, it seems no one knows a answer for my problem.... Share this post Link to post Share on other sites
GAMEER_77 0 Posted September 24, 2002 Maybe its running more than once, try this: Put this into the init.sqs: coun1 = 0 Put this line of code at the top of the script: coun1= coun1 + 1 Then at the bottom, but before the exit command, put this: hint format ["Times Run %1", coun1] If it runs more than once we've found your problem. PEACE Share this post Link to post Share on other sites
nedal 0 Posted September 25, 2002 @Gameer ... Actualy, i could not even get the script running, so i guess i wont be able to cound if the script runns more the ones! First i tried to make it with a trigger, and it worked, but there was not just 1 tank comming, there where a feew randomly comming! i dont know if i can use your counter for a trigger. i read in other treads that this is a known problem, and it should be solved with Gamelogic Server.... but i dont know how i can get running.... i guess i have to look in a example mission where create vehicle is working activatet by a trigger... but i cant find such a mission Share this post Link to post Share on other sites
suma 8 Posted September 25, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (nedal @ Sep. 17 2002,18:10)</td></tr><tr><td id="QUOTE">I got it working, but now i have the problem that actually not just one M113 appears, but randomly a few M113.<span id='postcolor'> I assume it is MP problem. It is very likely that your script (or trigger activation line)is executed on several computers. As each createVehicles creates vehicle on all computers in the game, you need to make sure it is executed on one computer only (you may select server, use local command to select server, if you do not know how to use it, search this forum). Share this post Link to post Share on other sites
suma 8 Posted September 25, 2002 Note: you do not need to use script to be able to check for server. All you need is to change trigger condition from this to this and local server, where server is gamelogic object placed in the editor. Share this post Link to post Share on other sites
nedal 0 Posted September 25, 2002 well i made it with gamelogic Server..... but i get an error msg : "Panzerwest = "M113" createVehicle getPos GLem113; [#]': Error ungültige Zahl in Ausdruck (unexpectet number in expression) well, if you have time, please see my mission (just a trigger and a sript) download mission file Share this post Link to post Share on other sites