Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
So I've searched it on the forums but can't find anything to help with my issue so Say it was a top down football game and I wanted to throw the ball from a top down perspective by clicking on the field where I want it how would I do that? any ideas? |
||||
|
@guest99, maybe this helps: Move object by click into 3D world extension: https://ambiera.com/coppercube/d... https://neophyte.cf/ccb_behavior... |
||||
|
I was trying to use that but for the game I'm trying to make I need the option to select which scene node I want to throw instead of just throw this one yk I hope that makes sense |
||||
|
@guest99, here is an alternative quick and dirty adjusted version of the mentioned script letting you specify and change the affected scene node at runtime by assigning the corresponding scene node name to the CopperCube variable called ClickMoveObject - small demo included (must be terminated with [Alt+F4], ESC not set for closing app yet ...): https://www.dropbox.com/scl/fi/z... |
||||
|
@hadoken Thanks I really appreciate it, Thanks man |
||||
|
@hadoken Sorry to bother you again but I was wondering if it was possible to say when you throw that football you can't do it again but it still gets to the location it needs to, Thanks |
||||
|
@guest99, try this revision, first node has to finish position change before another node and another click position will be accepted for executing behavior (includes debug_info option for console messages): https://www.dropbox.com/scl/fi/e... |
||||
|
@hadoken, I'm sorry I still don't understand how this works |
||||
|
@guest99 1.) assign the behavior behavior_MoveCCVarSpecifiedObjectByPositi.js (v2!) to any visible node 2.) use on scene root -> Before first drawing do something -> Set or Change a Variable -> name variable ClickMoveObject and set your ball scene node as value 3.) if you click on the field in-game, the ball should move to the clicked position, after that the ball would move to another clicked position 4.) to stop the ball moving to any mouse clicks set ClickMoveObject CopperCube variable to any other invisible node out of screen (that could e.g. be triggered by a key press or On proximity ... behavior ...) 5.) to reactivate ball moving set variable back to ball node If that explanation doesn't help at all, feel free to post your scene project file for us to have a look into the issue .... |
||||
|
@hadoken I really appreciate all the help, I'm more of an artist(not a good one) than anything. https://1drv.ms/u/s!AiaHd2kpdCny... thanks, |
||||
|
Oh, and sorry for putting you through this |
||||
|
Hi @guest99, had a look into the current state of your project: so far you have: - a ball game field - a player controlled by keyboard - a visible mouse cursor ready to click and trigger things please let me know in more detail what should now happen next, what do you exactly want to achieve? (e.g. click into the field and a ball jumps in at the clicked position or click into the field and the player moves there ...) (besides, I'm not familiar with areal football game is played ...) |
||||
|
@ hadoken thanks for taking a look at it. I just want to get it to where the player can throw the ball across the screen and go from there. The throwing is the only thing stumping me right now. Thanks, |
||||
|
Hi @Guest99, 1. Should the player's movement be controlled via the keyboard as already set or by mouse click on the playing field? 2. Should the player throw a ball by keystroke or by mouse click? 3. Should the ball be thrown straight ahead from the player or from the edge of the field, must it rather fly in an arc? 4. Should the player automatically move to where the ball lands? 5. I assume the ball has to go into or through one of the two forked goals, right? Cheers. |
||||
|
@hadoken 1. Keyboard 2. Mouse click 3. Straight from the players arms(it’s on a mixamo rig If adding arc is possible it’d definitely be preferred. If it’s not possible I could have a scrip that checks where the mouse was clicked and if the ball goes into that radius it sets a value to one and if the value is 1 the players can catch. 4 what I was thinking for that is when the ball is throw the closest active camera to where it was thrown gets switched and we switch the player out for another 5. Not in the base gameplay but In American Football when you score you have the option to either kick the ball into the forked goalpost or start at the 5 and run a play ( more risky ) for 2 points instead of 1 when you kick I really appreciate your replying I know it’s allot Thanks |
|