Is it possible to do this with Gamesalad...?
allc1865
Member, PRO Posts: 777
Is it possible to have multiple enemies that have been spawned shoot at you at the same time in your game?
Thanks.
Thanks.
Best Answers
-
-Timo- Posts: 2,313yes
first make 2 game integer attributes. playerY and playerX
constrain game.playerY to self.position.Y
constrain game.playerX to self.position.X
in bullet you have rotate to position
game.playerX game.playerY
speed 1000
and let it move to self.rotation.
not sure if this is the best way but it should work
hope this helped -
Bellow Bartender Posts: 227Yes make game attribute fire
for you shoot make a rule
when attribute fire 0
spawn actor fire
change attribute fire 1
at the fire attribute
put timer after 3 sec (or whatever)
destroy this actor
change attribute fire 0
maybe this will help you. Put this rule for your enemies
Lol i think i understand question wrong way and you were faster than me -
-Timo- Posts: 2,313
@timolapre1998, first make 2 game integer attributes. playerY and playerX
nope, inside the player
constrain game.playerY to self.position.Y
constrain game.playerX to self.position.X
These behaviors go into the enemy actor, I'm assuming, correct?
Answers
It really is that straightforward . . . hold on let me make you a quick demo . . .
constrain game.playerY to self.position.Y
constrain game.playerX to self.position.X
These behaviors go into the enemy actor, I'm assuming, correct?
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
When you select a post as the answer the forum deletes the attachment, rendering a lot of answered questions supplied as an example GameSalad project completely useless.
Future GameSalad users can browse the forums looking for solutions to issues to be met with dozens of empty posts.
Absolutely useless, this has been happening for months now, there are so many issues with Vanilla, why can't GameSalad just use off the shelf BB software ? Pretty much every forum I look through has things like buttons to embolden type, to create links, to embed pictures, but here it's up to users to code everything, even italicising type, sure it's not too difficult, but it's totally unnecessary given there are so many much better options out there. God I hate this forum software, lol !! ( And that's without mentioning that fact that I can't stay logged in for more than 2 or 3 posts, constantly having to retype my email address and password, constantly losing posts I've typed out because half way through Vanilla decides to log me out and tell me 'you don't have permission to do that', 'you don't have permission to do that', 'you don't have permission to do that', 'you don't have permission to do that', 'you don't have permission to do that' all freaking day, for years (literally years) . . . . . aghhhhhhhhhhh I hate this forum platform so freaking useless, so time wasting, such a pain to use !
[rant over, need a coffee and some crack to calm down]
I dont agree with "I hate this forum platform so freaking useless" :P
I am glad you calmed down
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
When:
player's X position is larger than (>) 100 and smaller than (<) 200 . . . . and
player's Y position is larger than (>) 600 and smaller than (<) 700 . . .
. . . then spawn whatever you want to spawn.
This will give you a 100 x 100 area in the upper-lefthand side of the screen that will spawn whatever you want spawning when the player goes into that area.
But your invisible actor method is just as good, and probably easier to modify, move around and so on.
Thanks everyone for your help!!
This has been going on for years, I know others are effected by it too, it's not my system as during the time it's been happening I've changed computer three times (G5 > iMac > newer iMac), changed internet service provider at least twice, changed operating system (snow leopard, lion, mountain lion) and even moved house, it happens in all the browsers I've tried, so I think it's reasonable to conclude it's at the server end . . . and additionally every other single forum I look through and post in is absolutely trouble free, never logged out (unless I want), no lost posts, or deleted attachments etc, but then again they aren't using Vanilla. The crack hasn't kicked in yet, give it a few more minutes, I find with vanilla forum software my tolerances have risen, I need a couple of dozen 'rocks' washed down with a 50/50 coffee/floor polish mix just to stay calm.
I thought of having a timer, after 5 seconds, stop spawning, but there is no 'stop spawn' behavior.
Thanks.
change attribute spawncount+1
and put a new attribute rule under your spawning
spawn actor if attribute<15 or 10 how many spawn you want
There's not need to stop spawning, it stops by itself as it only spawns one actor.
If you want a specific amount of actors spawned, just make an attribute (let's call it "count") then have a rule that spawns an actor, adds one to the count, checks the count is still under 15 (or whatever) before spawning another.
EDIT: what @Bellow said >-
sorry i am not good teacher
like you said create attribute spawncount. In your enemies actor you already make a spawn actor rule right ? put it this rule here if attribute spawncount<15 this will make it if you spawn 15 enemies it doesnt spawn anymore
and again in that rule at the do section put change attribute spawncount +1 so this time whenever you spawn you spawncount going to up 1 when it hit 15 it wont be spawn enemies anymore.
I tried to get the enemy spawners to stop at a certain point and shoot at the player...so I placed a wall collider in my scene, and it stopped them, but they also stopped shooting...
Any ideas on how to solve this?
Thanks for your help anyway everyone. I will definitely use these templates.
here check this one