Hello everybody I want to know some things in the SFD map editor: 1) How to set backgrounds as foreground tiles. I know there is some kind of
marker that enables it, but i didnt finded how.
2) Can somebody give me a simple script to shot bullets.
3) I need a script for spawning granades (that will explode) and molotovs.
I already tried doing it but it spawned granades as an ammo (equipable)
and not a trigered.
Thanks for any answers.
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.
Can u tell me some things...
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- 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
A: 2)
You can use the SpawProjectile command. It need a position to spawn the projectile and an other postion to the shooting direction.
Here is a little script:
Be sure that you have an object, for example invisible block with no collison, set to "shootingposition" by its custom ID, and another to "shootingdirection". You can change the names whatever you want, just make sure that you match the names.
This example uses silenced pistol, but you can change it to for example SILENZEDUZI or ASSAULT.
So i suppose that you can do it with this answer, but i can't answer the other q:s.
I hope that even someone reads this...
You can use the SpawProjectile command. It need a position to spawn the projectile and an other postion to the shooting direction.
Here is a little script:
Code: Select all
public void Shooting(TriggerArgs args){
IObject obj = Game.GetSingleObjectByCustomId("shootingposition");
IObject objDir = Game.GetSingleObjectByCustomId("shootingdirection");
Vector2 pos = obj.GetWorldPosition();
Vector2 dir = objDir.GetWorldPosition();
Game.SpawnProjectile(ProjectileItem.SILENCEDPISTOL, pos, dir - pos);
Game.PlaySound("SILENCEDPISTOL", pos, 1f);
}
This example uses silenced pistol, but you can change it to for example SILENZEDUZI or ASSAULT.
So i suppose that you can do it with this answer, but i can't answer the other q:s.
I hope that even someone reads this...
Last edited by Motto73 on Tue May 17, 2016 11:33 am, edited 2 times in total.
0 x
- Yopa
- Superfighter
- Posts: 71
- Joined: Mon Mar 21, 2016 10:02 am
- Title: The great cosmic christ
- SFD Alias: Diablo Yoyoeho
- Started SFD: 1.5.9
- Location: Paris
- Gender:
- Age: 8
1) Read the tutorial of the map editor. We use invisble block with (i think) targettrigger or something with trigger.
3) Read the tutorial of triggers
3) Read the tutorial of triggers
0 x