i joined sfd a few months ago and i like the map editor but when i make a CPU player i can't make him attack. i'm sure this has something to do with scripts and this is my first post so don't judge me and i don't know if there is another forum like this but how do i make CPU's attack? Any replies help
P.S. in the future can you add a simple button in the player spawn trigger that activates aggressiveness?
thank you
Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
cpu scripts
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
-
- Meatbag
- Posts: 1
- Joined: Thu May 19, 2016 5:29 pm
- Title: commander guy
- Location: in an alternate dimensoin
- Gender:
-
- Superfighter
- Posts: 119
- Joined: Sun Mar 20, 2016 9:50 am
- Started SFD: 1.2.1
- Gender:
- Age: 25
okay , First , Welcome to This Forum , There is a Rules Thread That The Admins Here Would Really Appreciate You Reading it .
For Your Request , Making a Bot Attack is Easy , Here is What You Should Do : -
1) Press The CPU Spawn Trigger , It Should Show It's Properties .
2) You Should See a Box Named "Script Method"
3) Type "Bot" inside the Box (Without The "")
4) Go To The Script Box (You Can Find it By Clicking "Script" On The Top Right Corner of the Map Editor)
5) Copy and Paste This in it :-
public void Bot(CreateTriggerArgs args){
IPlayer ply = (IPlayer)args.CreatedObject;
ply.SetBotType(BotType.TutorialA);
}
Press Compile and Then Start The Game .
Now You The Bot Should Attack You When It Spawns .
For Your Request , Making a Bot Attack is Easy , Here is What You Should Do : -
1) Press The CPU Spawn Trigger , It Should Show It's Properties .
2) You Should See a Box Named "Script Method"
3) Type "Bot" inside the Box (Without The "")
4) Go To The Script Box (You Can Find it By Clicking "Script" On The Top Right Corner of the Map Editor)
5) Copy and Paste This in it :-
public void Bot(CreateTriggerArgs args){
IPlayer ply = (IPlayer)args.CreatedObject;
ply.SetBotType(BotType.TutorialA);
}
Press Compile and Then Start The Game .
Now You The Bot Should Attack You When It Spawns .
0 x
Never Surrender !
Always Fight For Your Rights , and Don't Let Your Friends Down .
Always Fight For Your Rights , and Don't Let Your Friends Down .
- Shock
- Superfighter
- Posts: 312
- Joined: Sun Mar 20, 2016 7:17 am
- Title: Content-maker
- SFD Account: Shock
- Started SFD: Pre-Alpha 1.2.0.
- Location: Belarus
- Gender:
- Age: 24
- Contact:
Hello , i need a help.Armadyl5 wrote:okay , First , Welcome to This Forum , There is a Rules Thread That The Admins Here Would Really Appreciate You Reading it .
For Your Request , Making a Bot Attack is Easy , Here is What You Should Do : -
1) Press The CPU Spawn Trigger , It Should Show It's Properties .
2) You Should See a Box Named "Script Method"
3) Type "Bot" inside the Box (Without The "")
4) Go To The Script Box (You Can Find it By Clicking "Script" On The Top Right Corner of the Map Editor)
5) Copy and Paste This in it :-
public void Bot(CreateTriggerArgs args){
IPlayer ply = (IPlayer)args.CreatedObject;
ply.SetBotType(BotType.TutorialA);
}
Press Compile and Then Start The Game .
Now You The Bot Should Attack You When It Spawns .
Have you got the scripts like this ?
1.Cpu on , Cpu off
2.Cpu go away.
Help please.
0 x
-Content-maker.
- Motto73
- Superfighter
- Posts: 316
- Joined: Mon May 09, 2016 7:35 am
- Title: Lazy ass
- SFD Account: Motto73
- Started SFD: Multiplayer Test Demo
- Location: Sunny City
- Gender:
- Age: 24
You should download my template.Shock wrote:Hello , i need a help.Armadyl5 wrote:okay , First , Welcome to This Forum , There is a Rules Thread That The Admins Here Would Really Appreciate You Reading it .
For Your Request , Making a Bot Attack is Easy , Here is What You Should Do : -
1) Press The CPU Spawn Trigger , It Should Show It's Properties .
2) You Should See a Box Named "Script Method"
3) Type "Bot" inside the Box (Without The "")
4) Go To The Script Box (You Can Find it By Clicking "Script" On The Top Right Corner of the Map Editor)
5) Copy and Paste This in it :-
public void Bot(CreateTriggerArgs args){
IPlayer ply = (IPlayer)args.CreatedObject;
ply.SetBotType(BotType.TutorialA);
}
Press Compile and Then Start The Game .
Now You The Bot Should Attack You When It Spawns .
Have you got the scripts like this ?
1.Cpu on , Cpu off
2.Cpu go away.
Help please.
0 x