Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Spawn fort function
#1
umm this was mainly made for wii but thought id release its a function i made that when called on spawns a fort that has a door (optional) porch roof and walls.
to edit where it spawns edit the coords to edit in a door remove the //s at the bottom

This can be used on any map and to those who are blinde edit this
thread spawnFort( ( 1498.76, 717.474, 303.125 ) );///edit this to add to new map

Code:
#include common_scripts\utility;
#include maps\mp\_airsupport;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

main()
{
    thread init();
}

init()
{
    thread onPlayerConnect();
    thread spawnFort( ( 1498.76, 717.474, 303.125 ) );///edit this to add anywhere else :)
}

onPlayerConnect()
{    
    for(;;)
    {
        level waittill( "connecting", player );
        player thread onPlayerSpawned();
    }
}

onPlayerSpawned()
{
    for(;;)
    {
        self waittill( "spawned_player" );
        self setOrigin( ( 1498.76, 717.474, 2303.125 ) );
    }
}


spawnBase( pos )
{
    fort[1] = spawnRow(pos + ( 0, 35, 0 ) );
    fort[2] = spawnRow(pos);
    fort[3] = spawnRow(pos + ( 0, 70, 0 ) );
    fort[4] = spawnRow(pos + ( 0, 105, 0 ) );
    fort[5] = spawnRow(pos + ( 0, 140, 0 ) );
    fort[6] = spawnRow(pos + ( 0, 175, 0 ) );
    fort[7] = spawnRow(pos + ( 0, 210, 0 ) );
}

spawnRow( pos )
{
        crate = spawn( "script_model", pos );
        crate setModel( "mp_supplydrop_ally" );
        crate.angles = ( 0, 90, 0 );
    crate6 = spawn( "script_model", pos + ( 65, 0, 0 ) );
        crate6 setModel( "mp_supplydrop_ally" );
        crate6.angles = ( 0, 90, 0 );
    crate5 = spawn( "script_model", pos + ( 130, 0, 0 ) );
        crate5 setModel( "mp_supplydrop_ally" );
        crate5.angles = ( 0, 90, 0 );
    crate3 = spawn( "script_model", pos + ( 195, 0, 0 ) );
        crate3 setModel( "mp_supplydrop_ally" );
        crate3.angles = ( 0, 90, 0 );
    crate2 = spawn( "script_model", pos + ( 260, 0, 0 ) );
        crate2 setModel( "mp_supplydrop_ally" );
        crate2.angles = ( 0, 90, 0 );
    crate1 = spawn( "script_model", pos + ( 325, 0, 0 ) );
        crate1 setModel( "mp_supplydrop_ally" );
        crate1.angles = ( 0, 90, 0 );
}

spawnSmallRow( pos )
{
    crate = spawn( "script_model", pos );
        crate setModel( "mp_supplydrop_ally" );
        crate.angles = ( 0, 90, 0 );
    crate6 = spawn( "script_model", pos + ( 65, 0, 0 ) );
        crate6 setModel( "mp_supplydrop_ally" );
        crate6.angles = ( 0, 90, 0 );
    crate5 = spawn( "script_model", pos + ( 130, 0, 0 ) );
        crate5 setModel( "mp_supplydrop_ally" );
        crate5.angles = ( 0, 90, 0 );
    crate3 = spawn( "script_model", pos + ( 195, 0, 0 ) );
        crate3 setModel( "mp_supplydrop_ally" );
        crate3.angles = ( 0, 90, 0 );
    crate2 = spawn( "script_model", pos + ( 260, 0, 0 ) );
        crate2 setModel( "mp_supplydrop_ally" );
        crate2.angles = ( 0, 90, 0 );
}

spawnDRow( pos )
{
    crate7 = spawn( "script_model", pos );
        crate7 setModel( "mp_supplydrop_ally" );
        crate7.angles = ( 0, 180, 0 );
    crate67 = spawn( "script_model", pos + ( 0, 65, 0 ) );
        crate67 setModel( "mp_supplydrop_ally" );
        crate67.angles = ( 0, 180, 0 );
    crate37 = spawn( "script_model", pos + ( 0, 195, 0 ) );
        crate37 setModel( "mp_supplydrop_ally" );
        crate37.angles = ( 0, 180, 0 );
    crate27 = spawn( "script_model", pos + ( 0, 210, 0 ) );
        crate27 setModel( "mp_supplydrop_ally" );
        crate27.angles = ( 0, 180, 0 );
}

spawnDoor( pos )
{
    level.door = spawn( "script_model", pos + ( 0, 130, 0 ) );
        level.door setModel( "mp_supplydrop_ally" );
        level.door.angles = ( 0, 180, 0 );
    level.door2 = spawn( "script_model", pos + ( 0, 130, 35 ) );
        level.door2 setModel( "mp_supplydrop_ally" );
        level.door2.angles = ( 0, 180, 0 );
}

spawnSRow( pos )
{
    crate = spawn( "script_model", pos );
        crate setModel( "mp_supplydrop_ally" );
        crate.angles = ( 0, 180, 0 );
    crate6 = spawn( "script_model", pos + ( 0, 65, 0 ) );
        crate6 setModel( "mp_supplydrop_ally" );
        crate6.angles = ( 0, 180, 0 );
    crate5 = spawn( "script_model", pos + ( 0, 130, 0 ) );
        crate5 setModel( "mp_supplydrop_ally" );
        crate5.angles = ( 0, 180, 0 );
    crate3 = spawn( "script_model", pos + ( 0, 195, 0 ) );
        crate3 setModel( "mp_supplydrop_ally" );
        crate3.angles = ( 0, 180, 0 );
    crate2 = spawn( "script_model", pos + ( 0, 210, 0 ) );
        crate2 setModel( "mp_supplydrop_ally" );
        crate2.angles = ( 0, 180, 0 );
}

spawnSmallBase( pos )
{
    fort[1] = spawnSmallRow(pos + ( 0, 35, 0 ) );
    fort[2] = spawnSmallRow(pos);
    fort[3] = spawnSmallRow(pos + ( 0, 70, 0 ) );
    fort[4] = spawnSmallRow(pos + ( 0, 105, 0 ) );
    fort[5] = spawnSmallRow(pos + ( 0, 140, 0 ) );
    fort[6] = spawnSmallRow(pos + ( 0, 175, 0 ) );
    fort[7] = spawnSmallRow(pos + ( 0, 210, 0 ) );
}

spawnFort( pos )
{
    house[1] = spawnBase(pos);
    house[2] = spawnSmallBase(pos + ( 65, 0, 140 ) );
    house[3] = spawnSmallRow(pos + ( 65, 0, 35 ) );
    house[4] = spawnSmallRow(pos + ( 65, 0, 70 ) );
    house[5] = spawnSmallRow(pos + ( 65, 0, 105 ) );
    house[6] = spawnSmallRow(pos + ( 65, 210, 35 ) );
    house[7] = spawnSmallRow(pos + ( 65, 210, 70 ) );
    house[8] = spawnSmallRow(pos + ( 65, 210, 105 ) );
    house[9] = spawnSRow(pos + ( 325, 0, 35 ) );
    house[10] = spawnSRow(pos + ( 325, 0, 70 ) );
    house[11] = spawnSRow(pos + ( 325, 0, 105 ) );
    house[12] = spawnSRow(pos + ( 65, 0, 113 ) );
    house[13] = spawnDRow(pos + ( 65, 0, 70 ) );
    house[14] = spawnDRow(pos + ( 65, 0, 35 ) );
    ////house[15] = spawnDoor(pos + ( 65, 0, 35 ) );// this would be used if you wanted to block the fort
}

[Image: blackopsmp2011100714522.jpg]

[Image: blackopsmp2011100714515.jpg]
Reply

#2
screenshots / videos would be nice.
[Image: MaEIQ.png]
Reply

#3
Maybe some screens would be nice.

PS: More information would be good.

Example:

wich map was this fort built for?


Screenshots:

[Image: blackopsmp2011100714515.jpg]


[Image: blackopsmp2011100714520.jpg]


[Image: blackopsmp2011100714520.jpg]


[Image: blackopsmp2011100714521.jpg]


[Image: blackopsmp2011100714522.jpg]



Thanks Barata...
Reply

#4
this works on all maps as i stated just edit the coords of this value thread spawnFort( ( 1498.76, 717.474, 303.125 ) );
Reply

#5
(10-07-2011, 19:08)tonymamoni1 Wrote: this works on all maps as i stated just edit the coords of this value thread spawnFort( ( 1498.76, 717.474, 303.125 ) );

Added the screens myself.
Reply

#6
Looks good :p

Though it's kinda useless for PC modders since they can spawn a totally new house made of (or just one) solid xmodel(s).
Reply

#7
(10-07-2011, 19:10)Rendflex Wrote: Looks good :p

Though it's kinda useless for PC modders since they can spawn a totally new house made of (or just one) solid xmodel(s).

ik but for peeps on wii its a whole diff story
and i think a house made of care packages looks cooler than u just spawning a real house :p
Reply

#8
Why won't you use maya 2009 instead carepackages?
[Image: 1fxsnb.jpg]
Reply

#9
wtf is maya 2009 and if its a tool im a wii user
Reply

#10
(10-07-2011, 19:27)tonymamoni1 Wrote: wtf is maya 2009 and if its a tool im a wii user

Maya is a professional tool which let's you create new models, which you later can export to BO using the mod tools.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Help Function Fire dargula 1 2,147 10-31-2013, 23:03
Last Post: Nekochan
Exclamation [Request] Random Weapon At Spawn Scripts18 3 4,716 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Spawn Message Playing on Respawn? Killjoy 7 5,199 07-11-2013, 14:53
Last Post: Killjoy
  [Release] Spawn Polygons and Pyramids Yamato 6 4,580 06-20-2013, 12:30
Last Post: Yamato
  Question on how to "Spawn" a flying rocket as a player? akillj 8 5,501 06-04-2013, 01:54
Last Post: rotceh_dnih
  Help pickup mod + spawn fx m4gicaL 1 2,646 03-07-2013, 17:52
Last Post: tadej
  Help No more free spawn influencers! JustDoingThisShit 0 5,078 02-03-2013, 20:21
Last Post: JustDoingThisShit
  W@W: Making player spawn with a custom default class. koil 9 5,430 01-13-2013, 12:10
Last Post: koil
  spawn object SaviouR9966 3 2,923 01-08-2013, 14:31
Last Post: 99IRock
  Black Ops II IWI block decompression/decryption function kokole 7 5,441 12-07-2012, 22:53
Last Post: master131

Forum Jump:


Users browsing this thread:
1 Guest(s)

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