Recruitment Votes
244

Votes

Help your community and vote every 24 hours!

Welcome

Forgot Password?
Chat Box
Tournaments

We haven't setup any tournaments yet.

Online Members
None
Online Guests: 1
Page Counter
257,201
Web Traffic
Birthdays
=oMG= CocaoCoD4 Memb
21 years old in 2 days
ix.'konraaHD
20 years old in 5 days
Luke
3 years old 26th Aug
SVENG
22 years old 9th Sep
Glarovich
17 years old 13th Sep
Top Posters
oMG- Furious-FFounder
639 posts

Hazza1337
3 posts

.: oMG :. FosterCSGO Memb
2 posts

.: oMG :. JackCSGO Admin
2 posts

.: oMG :. HarryCSGO Memb
2 posts

=oMG= Fakey xCoD4 Memb
2 posts

.: oMG :. TobiasActualCSGO Memb
1 posts

=oMG= BoWtoMeCoD4 Memb
1 posts

turtlejack
1 posts

Psycho
1 posts

TeamSpeak 3 Server
<center><iframe src="http://cache.www.gametrac ... &width=180" frameborder="0" scrolling="no" width="180" height="438"></iframe></center>
Facebook
Google Plus
Battlefield 4 Stats
.: oMG :. FosterCSGO Memb
Score: 4,694,387 · K/D: 1.36

.: oMG :. HarryCSGO Memb
Score: 221,983 · K/D: 0.67

oMG- Furious-FFounder
Score: 151,063 · K/D: 0.79

Yungez
Score: 23,420 · K/D: 0.61

=oMG= Shack480CoD4 Memb
Score: 10,015 · K/D: 0.28

How to script (full tutorial)
Forum » Development » Scripting
Joined: 2nd Jul 2014
Rank: CoD4 Super Admin
Likes 180
1st Sep 2014

Hey guys, it took me so long to understand how to even make my first trap work, so I would like to help u guys with that. First, chose the object u wana make move or do a movement, press right on mouse and in 2D choose script then choose brushmodel. OK then open the entity window (Press "N" and in "Key" type "targetname" and then in "Value" call it as u want, i will say "trap1" for example. After that, go to where the trap is activated and make a brush, then click with right mouse again but choose trigger then use_touch and in "Key" type "targetname" again but this time in "Value" type for example "trap1_trig". OK now for the scripting part, go to ur cod4 and choose raw/maps/mp and make a file called mp_URMAPNAME, dont call it like that call it the name of ur map, if ur good enought u get it. Anyways make sure this is a .gsc file. Now that everything is done add this custom line to the text document, this is nessesary:

main()
{
maps\mp\_load::main();

game["allies"] = "sas";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";
}

ok so now we must allow the game to use and to do what we want trap1 to do so we have to make a thread, ur text should look like this

main()
{
maps\mp\_load::main();

game["allies"] = "sas";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";

thread trap1();
}

now u must add what u want trap 1 to do, so lets just make the brushmodel (trap1) spin till next round:

trap1()
{
trap1= getent( "trap1","targetname" );
trig = getent("trap1_trig","targetname" );
while(1)
{
trig waittill("trigger" );
trig delete();
wait (1);
trap1 rotateyaw (72000, 600 );
}
}

ok this is what it should look like at the end:

main()
{
maps\mp\_load::main();

game["allies"] = "sas";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";

thread trap1();
}

trap1()
{
trap1= getent( "trap1","targetname" );
trig = getent("trap1_trig","targetname" );
while(1)
{
trig waittill("trigger" );
trig delete();
wait (1);
trap1 rotateyaw (72000, 600 );
}
}

this is just an example but here are all the movements, idk em all but here are some:
rotateyaw: makes something spin itself (like a merry go round)
rotateroll: for example take a baseball bat and make it roll down a hill
rotatepitch: like a frontflip
moveZ: make Z axis move ( up and down by using "-" or without )
moveX: make X axis move ( forwards and backwards by using "-" or without )
moveY: make Y axis move ( sideways )

Well hope it help, also make sure to enable developper script when compiling map good luck

Like (2) · Comments (0)


Signature Picture

why am I so pro?

Last Edit: 11th Sep 2014 by Nickkiller
Joined: 18th Jun 2013
Rank: Founder
Likes 569
1st Sep 2014

Good job nick! And thank you Em, I just edited your post a little bit, putting the codes into "Code" and making some sentences more clear for starters
Like (1) · Comments (2)


Signature Picture

---------------------------------------------------------------------------------------------------------------------------------------------------------



“You only live once, but if you do it right, once is enough.” ~ Mae West
“Ride or die, remember?” ~ Vin Diesel

BreidodDonator
Joined: 31st Jul 2014
Rank: Donator
Likes 121
1st Sep 2014

ty ;D
Like (2) · Comments (0)


Signature Picture

my gaming pc

cpu: i7 4790K
gpu: R9 290 Sapphire Vapor-X

Joined: 2nd Jul 2014
Rank: CoD4 Super Admin
Likes 180
11th Sep 2014

srry furious but had to take the off cause it messed the script up


Signature Picture

why am I so pro?

Forum » Development » Scripting
Please login or register to reply.
Donate

Donate

Recent Donations
MrNoTeamDonator
€3.00 EUR
14th Sep 2014
BreidodDonator
€20.00 EUR
23rd Aug 2014
BreidodDonator
€6.00 EUR
31st Jul 2014
MortiisDonator
€3.00 EUR
26th Jul 2014
=oMG= Shack480CoD4 Memb
$5.00 CAD
20th Jul 2014
Next »
Recent Topics
I'm back. after 1 ye...
oMG- Furious-FFounder
10th Jun 2015 · Last



Callum - CS:GO Appli...
=oMG= NickkillerCoD4 Super
29th Mar 2015 · Last


Harry - CS:GO Applic...
oMG- Furious-FFounder
22nd Feb 2015 · Last

Cs go trading
=oMG= NickkillerCoD4 Super
17th Feb 2015 · Last

Harry - BF4 Applicat...
[oMG] LeXmArKBF4 Super
12th Feb 2015 · Last

christmas event
=oMG= NickkillerCoD4 Super
16th Jan 2015 · Last

3 Words Story
=oMG= NickkillerCoD4 Super
16th Jan 2015 · Last
Game Servers
<center><a href="http://www.gametracker.co ... 143.106:28019/" target="_blank"><img src="http://cache.www.gametrac ... 0000_0_0_0.png" border="0" width="180" height="182" alt=""/></a></center>
Twitter
Events
« Aug 2017 »
M
T
W
T
F
S
S
 
2
3
4
5
6
7
9
10
11
12
13
14
15
16
18
19
21
22
24
25
27
28
29
30
31