Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Map Building Functions Enhanced
#31
thanks man now i've tried this
Code:
Summit() { wait 2; CreateStraightWalls((5252, -4790, 229), (5168, -4862, 279)); CreateStraightWalls((5252, -4790, 304), (5168, -4862, 329)); CreateStraightWalls((5107, -4921, 228), (5036, -4984, 278)); CreateStraightWalls((5107, -4921, 303), (5036, -4984, 328)); CreateStraightWalls((5592, -5099, 203), (5291, -5394, 428)); CreateStraightWalls((5282, -4762, 345), (4968, -5044, 370)); CreateStraightWalls((5282, -4762, 345), (5531, -5042, 370)); }
but nothing in put in the map ? or did you mean before doMaps()?
Reply

#32
(03-17-2011, 11:44)rotceh_dnih Wrote: thanks man now i've tried this
Code:
Summit() { wait 2; CreateStraightWalls((5252, -4790, 229), (5168, -4862, 279)); CreateStraightWalls((5252, -4790, 304), (5168, -4862, 329)); CreateStraightWalls((5107, -4921, 228), (5036, -4984, 278)); CreateStraightWalls((5107, -4921, 303), (5036, -4984, 328)); CreateStraightWalls((5592, -5099, 203), (5291, -5394, 428)); CreateStraightWalls((5282, -4762, 345), (4968, -5044, 370)); CreateStraightWalls((5282, -4762, 345), (5531, -5042, 370)); }
but nothing in put in the map ?
Do u sure that u have loaded the mod and the thread?
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#33
yes i am alterin iangles old school mod it load's all the guns swawn on the map all but one i took out,but no wall or ramp or anything else i add in
like this so i know it loading somestuff
Code:
Summit() { wait 2; CreateWeapon("mp5k_elbit_mp", "MP5k Red Dot", (3101.26, 1566.16, 362.125), (0, 0, 0), 1, 15); CreateWeapon("mac11_rf_mp", "MAC11 Rapid Fire", (2590.35, -669.885, 330.125), (0, 0, 0), 1, 15); CreateWeapon("m16_extclip_mp", "M16 Extended Mags", (4029.1, -882.752, 330.125), (0, 0, 0), 1, 15); CreateWeapon("famas_reflex_mp", "Famas Reflex Sight", (3257.48, -1932.31, 466.125), (0, 0, 0), 1, 15); CreateWeapon("fnfal_silencer_mp", "Silenced FAL", (2314.37, -1806.61, 402.125), (0, 0, 0), 1, 15); CreateWeapon("m60_elbit_grip_extclip_mp", "Rambo's little girl", (3701.93, 659.677, 330.125), (0, 0, 0), 1, 15); CreateWeapon("l96a1_vzoom_mp", "L96 Variable Zoom", (2988.79, -76.4892, 330.125), (0, 0, 0), 1, 15); CreateWeapon("spas_silencer_mp", "Silenced SPAS", (1749.22, -433.601, 111.455), (0, 0, 0), 1, 15); CreateStraightWalls((5252, -4790, 229), (5168, -4862, 279)); CreateStraightWalls((5252, -4790, 304), (5168, -4862, 329)); CreateStraightWalls((5107, -4921, 228), (5036, -4984, 278)); CreateStraightWalls((5107, -4921, 303), (5036, -4984, 328)); CreateStraightWalls((5592, -5099, 203), (5291, -5394, 428)); CreateStraightWalls((5282, -4762, 345), (4968, -5044, 370)); CreateStraightWalls((5282, -4762, 345), (5531, -5042, 370)); level thread createPickupGroundFX((3101.26, 1566.16, 362.125), (90, 0, 0)); level thread createPickupGroundFX((2590.35, -669.885, 330.125), (90, 0, 0)); level thread createPickupGroundFX((4029.1, -882.752, 330.125), (90, 0, 0)); level thread createPickupGroundFX((3257.48, -1932.31, 466.125), (90, 0, 0)); level thread createPickupGroundFX((2314.37, -1806.61, 402.125), (90, 0, 0)); level thread createPickupGroundFX((3477.66, -1288.25, 466.125), (90, 0, 0)); level thread createPickupGroundFX((3701.93, 659.677, 330.125), (90, 0, 0)); level thread createPickupGroundFX((2988.79, -76.4892, 330.125), (90, 0, 0)); level thread createPickupGroundFX((1749.22, -433.601, 111.455), (90, 0, 0)); /** level thread createPickupGlowFX((3101.26, 1566.16, 362.125), (90, 0, 0)); level thread createPickupGlowFX((2590.35, -669.885, 330.125), (90, 0, 0)); level thread createPickupGlowFX((4029.1, -882.752, 330.125), (90, 0, 0)); level thread createPickupGlowFX((3257.48, -1932.31, 466.125), (90, 0, 0)); level thread createPickupGlowFX((2314.37, -1806.61, 402.125), (90, 0, 0)); level thread createPickupGlowFX((3477.66, -1288.25, 466.125), (90, 0, 0)); level thread createPickupGlowFX((3701.93, 659.677, 330.125), (90, 0, 0)); level thread createPickupGlowFX((2988.79, -76.4892, 330.125), (90, 0, 0)); level thread createPickupGlowFX((1749.22, -433.601, 111.455), (90, 0, 0)); **/ }
Reply

#34
For those who care about camo's I found this when i was looking for the bug with the strange weapon models.. here is a weapon function that gives the guns a camo. Camo should be a int from 0 to 15. The camo numbers can be found somewhere on this forum :p

Code:
CreateWeapon(weapon, name, pos, angle, stock, respawntime, camo) { weapon_model = getWeaponModel(weapon, camo); if(weapon_model == ""){ weapon_model = weapon; } Wep = spawn("script_model", pos+(0,0,3), 1); Wep.angles = angle; Wep SetOwner( level ); Wep setModel(weapon_model); Wep thread WeaponThink(weapon, name, pos, angle, stock, respawntime, camo); wait 0.01; } WeaponThink(weapon, name, pos, angle, stock, respawntime, camo) { area = spawn("trigger_radius", self.origin, 0, 25, 50); while(1) { area waittill("trigger", player); player.hint = "Press ^3[{+activate}] ^7to pick up " + name; if(player UseButtonPressed()){ switch( weapon ) { case "frag_grenade_mp": case "sticky_grenade_mp": case "hatchet_mp": case "flash_grenade_mp": case "concussion_grenade_mp": case "tabun_gas_mp": case "nightingale_mp": case "willy_pete_mp": player takeWeapon(player getCurrentOffhand()); player giveWeapon( weapon ); player setWeaponAmmoClip( weapon, 2 ); break; default: weaponOptions = player calcWeaponOptions ( camo, 0, 0, 0, 0 ); player giveWeapon(weapon, 0, int(weaponOptions)); player GiveMaxAmmo(weapon); player.weaponlist = player GetWeaponsListPrimaries(); if(player.weaponList.size > level.maxweaponper){ player takeWeapon(player getCurrentWeapon()); } player SwitchToWeapon(weapon); break; } if(stock > 1){ stock--; } else { if(isDefined(respawntime)){ level thread WeaponRespawnThink(weapon, name, pos, angle, stock, respawntime, camo); } area delete(); self delete(); return; } } wait .04; } } WeaponRespawnThink(weapon, name, pos, angle, stock, respawntime, camo) { wait respawntime; CreateWeapon(weapon, name, pos, angle, stock, respawntime, camo); }
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#35
And here's a fix for the ugly weapon models (untested .. just tried to convert the mw2 code i found)

Code:
CreateWeapon(weapon, name, pos, angle, stock, respawntime) { weapon_model = getWeaponModel(weapon); if(weapon_model == ""){ weapon_model = weapon; } Wep = spawn("script_model", pos+(0,0,3), 1); Wep.angles = angle; Wep SetOwner( level ); Wep setModel(weapon_model); Wep thread WeaponThink(weapon, name, pos, angle, stock, respawntime); tags = GetWeaponHideTags(weapon); attachments = GetArrayKeys(tags); for(i=0;i<attachments.size;i++) { Wep HidePart(tags[attachment]); } wait 0.01; }
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Matrix Functions Yamato 1 4,034 07-29-2013, 20:14
Last Post: Rendflex
  [Release] nCr and Factorial Functions Yamato 2 3,748 06-18-2013, 17:24
Last Post: Nekochan
  [Release] Random Functions 1.1 Yamato 22 18,197 04-20-2013, 10:13
Last Post: Dominator56
  [Release] Enhanced Botz alistair3149 11 32,700 01-02-2013, 12:59
Last Post: Paroxysmics
  Functions surtek 14 14,666 09-19-2012, 07:57
Last Post: Pozzuh
Information [Solved] Info about functions, events and etc. Nerus 2 3,546 09-09-2012, 20:57
Last Post: surtek
  Seldom required functions Phl3x_ 3 4,303 06-03-2012, 10:53
Last Post: RaZ
  Help I find This functions and i need your help. Bloodfocus 5 5,105 04-23-2012, 01:43
Last Post: House
  Help Functions iPrintLnBold() [Z00MBY] Alex 7 7,860 04-16-2012, 08:44
Last Post: [Z00MBY] Alex
  Preview Racing Mod Enhanced iAegle 18 13,606 03-25-2012, 05:35
Last Post: rotceh_dnih

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.